Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // package name PackageName string // file FileName string // per file symbol table SymbolTable *stack.Stack // per subset of packages symbol table GlobalSymbolTable *global.Table // per file allocatable ST AllocatedSymbolsTable *alloctable.Table // types parser TypeParser TypeParser // expresesion parser ExprParser ExpressionParser IsConst bool Iota uint // statement parser StmtParser StatementParser // per-file contract table ContractTable *contracttable.Table // symbols accessor SymbolsAccessor *accessors.Accessor }
Config for a parser
type ExprAttribute ¶
func ExprAttributeFromDataType ¶
func ExprAttributeFromDataType(list ...gotypes.DataType) *ExprAttribute
func (*ExprAttribute) AddTypeVar ¶
func (e *ExprAttribute) AddTypeVar(typevar typevars.Interface) *ExprAttribute
type ExpressionParser ¶
type ExpressionParser interface {
Parse(expr ast.Expr) (*ExprAttribute, error)
}
ExpressionParser implemenation is responsible for Go expression parsing/processing
type StatementParser ¶
type StatementParser interface { // Parse a general statement (there are no particular variables attached to the statement) Parse(statement ast.Stmt) error // ParseFuncDecl parses function declaration only ParseFuncDecl(d *ast.FuncDecl) (gotypes.DataType, error) // ParseFuncBody parses function body with pushing function parameter(s) and/or its receiver into the symbol table ParseFuncBody(funcDecl *ast.FuncDecl) error // ParseValueSpec parses variable definition/declaration ParseValueSpec(spec *ast.ValueSpec) ([]*symbols.SymbolDef, error) // ParseValueSpec parses constant definition/declaration ParseConstValueSpec(spec ConstSpec) ([]*symbols.SymbolDef, error) }
StatementParser implemenation is responsible for: - statement parsing/processing (block is considered a statement) -
Click to show internal directories.
Click to hide internal directories.