[refactoring] remove scanner interface
This commit is contained in:
parent
436287bbe1
commit
a636a14faa
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user