MCPcopy Create free account
hub / github.com/z7zmey/php-parser / NewParser

Function NewParser

php5/parser.go:27–37  ·  view source on GitHub ↗

NewParser creates and returns new Parser

(src []byte, v string)

Source from the content-addressed store, hash-verified

25
26// NewParser creates and returns new Parser
27func NewParser(src []byte, v string) *Parser {
28 lexer := scanner.NewLexer(src)
29 lexer.PHPVersion = v
30
31 return &Parser{
32 lexer,
33 nil,
34 nil,
35 nil,
36 }
37}
38
39// Lex proxy to lexer Lex
40func (l *Parser) Lex(lval *yySymType) int {

Callers 15

parsePhp5Function · 0.92
NewParserFunction · 0.92
BenchmarkPhp5Function · 0.92
TestPhp5Function · 0.92
TestPhp5StringsFunction · 0.92
TestPhp5HeredocFunction · 0.92
TestIdentifierFunction · 0.92
TestPhp5ArgumentNodeFunction · 0.92
TestPhp5ParameterNodeFunction · 0.92
TestCommentEndFileFunction · 0.92
TestEmptyFunction · 0.92

Calls 1

NewLexerFunction · 0.92

Tested by 15

parsePhp5Function · 0.74
BenchmarkPhp5Function · 0.74
TestPhp5Function · 0.74
TestPhp5StringsFunction · 0.74
TestPhp5HeredocFunction · 0.74
TestIdentifierFunction · 0.74
TestPhp5ArgumentNodeFunction · 0.74
TestPhp5ParameterNodeFunction · 0.74
TestCommentEndFileFunction · 0.74
TestEmptyFunction · 0.74
TestClosureFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…