Documentation ¶
Overview ¶
Package parser implements source code parsing. It uses parser (and lexer) generated by ANTLR4 from neva.g4 grammar file.
Index ¶
- type CustomErrorListener
- type Manifest
- type ModuleRef
- type Parser
- func (p Parser) ParseFile(bb []byte) (f src.File, err *compiler.Error)
- func (p Parser) ParseFiles(files map[string][]byte) (map[string]src.File, *compiler.Error)
- func (p Parser) ParseManifest(raw []byte) (src.ModuleManifest, error)
- func (p Parser) ParseModules(rawMods map[src.ModuleRef]compiler.RawModule) (map[src.ModuleRef]src.Module, *compiler.Error)
- func (p Parser) ParsePackages(rawPkgs map[string]compiler.RawPackage, modRef src.ModuleRef) (map[string]src.Package, *compiler.Error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomErrorListener ¶ added in v0.4.0
type CustomErrorListener struct { *antlr.DefaultErrorListener Errors []error }
func (*CustomErrorListener) SyntaxError ¶ added in v0.4.0
func (c *CustomErrorListener) SyntaxError( recognizer antlr.Recognizer, offendingSymbol any, line, column int, msg string, e antlr.RecognitionException, )
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (Parser) ParseFiles ¶
func (Parser) ParseManifest ¶
func (p Parser) ParseManifest(raw []byte) (src.ModuleManifest, error)
func (Parser) ParseModules ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.