cmd: add php5 flag
This commit is contained in:
@@ -12,15 +12,15 @@ import (
|
||||
)
|
||||
|
||||
type lexer struct {
|
||||
scanner.Lexer
|
||||
scanner.Lexer
|
||||
}
|
||||
|
||||
func (l *lexer) Lex(lval *yySymType) int {
|
||||
return l.Lexer.Lex(lval)
|
||||
return l.Lexer.Lex(lval)
|
||||
}
|
||||
|
||||
func (lval *yySymType) Token(t token.Token) {
|
||||
lval.token = t
|
||||
lval.token = t
|
||||
}
|
||||
|
||||
func newLexer(src io.Reader, fName string) *lexer {
|
||||
|
||||
@@ -16,14 +16,14 @@ var positions position.Positions
|
||||
var positionBuilder position.Builder
|
||||
|
||||
func Parse(src io.Reader, fName string) (node.Node, comment.Comments, position.Positions) {
|
||||
yyDebug = 0
|
||||
yyErrorVerbose = true
|
||||
rootnode = stmt.NewStmtList([]node.Node{}) //reset
|
||||
comments = comment.Comments{}
|
||||
positions = position.Positions{}
|
||||
positionBuilder = position.Builder{&positions}
|
||||
yyParse(newLexer(src, fName))
|
||||
return rootnode, comments, positions
|
||||
yyDebug = 0
|
||||
yyErrorVerbose = true
|
||||
rootnode = stmt.NewStmtList([]node.Node{}) //reset
|
||||
comments = comment.Comments{}
|
||||
positions = position.Positions{}
|
||||
positionBuilder = position.Builder{&positions}
|
||||
yyParse(newLexer(src, fName))
|
||||
return rootnode, comments, positions
|
||||
}
|
||||
|
||||
func ListGetFirstNodeComments(list []node.Node) []comment.Comment {
|
||||
@@ -37,16 +37,16 @@ func ListGetFirstNodeComments(list []node.Node) []comment.Comment {
|
||||
}
|
||||
|
||||
type foreachVariable struct {
|
||||
node node.Node
|
||||
byRef bool
|
||||
node node.Node
|
||||
byRef bool
|
||||
}
|
||||
|
||||
type nodesWithEndToken struct {
|
||||
nodes []node.Node
|
||||
endToken token.Token
|
||||
nodes []node.Node
|
||||
endToken token.Token
|
||||
}
|
||||
|
||||
type boolWithToken struct {
|
||||
value bool
|
||||
token *token.Token
|
||||
}
|
||||
value bool
|
||||
token *token.Token
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user