parser

package
v0.0.0-...-fab57c2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package parser provides a mockable wrapper for go/parser.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

type Impl struct{}

func (*Impl) ParseDir

func (*Impl) ParseDir(fset *token.FileSet, path string, filter func(fs.FileInfo) bool, mode parser.Mode) (pkgs map[string]*ast.Package, first error)

func (*Impl) ParseExpr

func (*Impl) ParseExpr(x string) (ast.Expr, error)

func (*Impl) ParseExprFrom

func (*Impl) ParseExprFrom(fset *token.FileSet, filename string, src any, mode parser.Mode) (expr ast.Expr, err error)

func (*Impl) ParseFile

func (*Impl) ParseFile(fset *token.FileSet, filename string, src any, mode parser.Mode) (f *ast.File, err error)

type Interface

type Interface interface {
	ParseDir(fset *token.FileSet, path string, filter func(fs.FileInfo) bool, mode parser.Mode) (pkgs map[string]*ast.Package, first error)
	ParseExpr(x string) (ast.Expr, error)
	ParseExprFrom(fset *token.FileSet, filename string, src any, mode parser.Mode) (expr ast.Expr, err error)
	ParseFile(fset *token.FileSet, filename string, src any, mode parser.Mode) (f *ast.File, err error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳