InitAll initializes everything about the parser -- call this when setting up a new parser after it has been loaded etc
()
| 57 | // InitAll initializes everything about the parser -- call this when setting up a new |
| 58 | // parser after it has been loaded etc |
| 59 | func (pr *Parser) InitAll() { |
| 60 | fs := &FileState{} // dummy, for error recording |
| 61 | fs.Init() |
| 62 | pr.Lexer.CompileAll(&fs.LexState) |
| 63 | pr.Lexer.Validate(&fs.LexState) |
| 64 | pr.Parser.CompileAll(&fs.ParseState) |
| 65 | pr.Parser.Validate(&fs.ParseState) |
| 66 | } |
| 67 | |
| 68 | // LexInit gets the lexer ready to start lexing |
| 69 | func (pr *Parser) LexInit(fs *FileState) { |
no test coverage detected