#18 replace heredocLabel variable from global

This commit is contained in:
z7zmey
2018-05-24 12:14:30 +03:00
parent 72cf9d106e
commit e7a9de3dfc
3 changed files with 28 additions and 31 deletions

View File

@@ -440,6 +440,7 @@ type Lexer struct {
StateStack []int
PhpDocComment string
Comments []comment.Comment
heredocLabel []lex.Char
}
// Rune2Class returns the rune integer id
@@ -467,7 +468,7 @@ func NewLexer(src io.Reader, fName string) *Lexer {
if err != nil {
panic(err)
}
return &Lexer{lx, []int{0}, "", nil}
return &Lexer{lx, []int{0}, "", nil, nil}
}
func (l *Lexer) ungetChars(n int) []lex.Char {