[refactoring] remove scanner.Lval interface

This commit is contained in:
Vadym Slizov
2020-05-18 01:01:35 +03:00
parent 8a50bd254a
commit 3bee91c972
6 changed files with 131 additions and 173 deletions

View File

@@ -36,9 +36,12 @@ func NewParser(src []byte, v string) *Parser {
}
func (l *Parser) Lex(lval *yySymType) int {
t := l.Lexer.Lex(lval)
l.currentToken = lval.token
return t
t := l.Lexer.Lex()
l.currentToken = t
lval.token = t
return int(t.ID)
}
func (l *Parser) Error(msg string) {