[refactoring] remove scanner interface

This commit is contained in:
Vadym Slizov 2020-05-18 21:44:03 +03:00
parent 436287bbe1
commit a636a14faa
3 changed files with 2 additions and 15 deletions

View File

@ -11,13 +11,9 @@ import (
"github.com/z7zmey/php-parser/pkg/token"
)
func (lval *yySymType) Token(t *scanner.Token) {
lval.token = t
}
// Parser structure
type Parser struct {
Lexer scanner.Scanner
Lexer *scanner.Lexer
currentToken *scanner.Token
positionBuilder *positionbuilder.PositionBuilder
rootNode ast.Vertex

View File

@ -10,13 +10,9 @@ import (
"github.com/z7zmey/php-parser/pkg/token"
)
func (lval *yySymType) Token(t *scanner.Token) {
lval.token = t
}
// Parser structure
type Parser struct {
Lexer scanner.Scanner
Lexer *scanner.Lexer
currentToken *scanner.Token
positionBuilder *positionbuilder.PositionBuilder
rootNode ast.Vertex

View File

@ -10,11 +10,6 @@ import (
"github.com/z7zmey/php-parser/pkg/token"
)
type Scanner interface {
Lex() *Token
ReturnTokenToPool(t *Token)
}
type Config struct {
WithHiddenTokens bool
ErrHandlerFunc func(*errors.Error)