Documentation ¶
Overview ¶
Package resolver implements a semantic resolving for the api language. It is responsible for converting from an abstract syntax tree to a typed semantic graph ready for code generation.
Index ¶
Constants ¶
View Source
const ( RefRune = 'ʳ' SliceRune = 'ˢ' ConstRune = 'ᶜ' PointerRune = 'ᵖ' ArrayRune = 'ᵃ' MapRune = 'ᵐ' TypeRune = 'ː' RefSuffix = string(RefRune) SliceSuffix = string(SliceRune) ConstSuffix = string(ConstRune) PointerSuffix = string(PointerRune) ArraySuffix = string(ArrayRune) MapSuffix = string(MapRune) TypeInfix = string(TypeRune) )
Variables ¶
This section is empty.
Functions ¶
func Resolve ¶
Resolve takes valid asts as produced by the parser and converts them to the semantic graph form. If the asts are not fully valid (ie there were parse errors) then the results are undefined. If there are semantic problems with the ast, Resolve will return the set of errors it finds, and the returned graph may be incomplete/invalid.
Types ¶
type Mappings ¶
type Mappings struct { parser.ParseMap ASTToSemantic map[ast.Node][]semantic.Node SemanticToAST map[semantic.Node][]ast.Node }
Mappings is a two-way relational map of AST nodes to semantic nodes.
func NewMappings ¶
func NewMappings() *Mappings
NewMappings returns a new, initialized Mappings struct.
Click to show internal directories.
Click to hide internal directories.