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

Function NewParser

php7/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
39func (l *Parser) Lex(lval *yySymType) int {
40 t := l.Lexer.Lex(lval)

Callers 15

ExamplePrinterFunction · 0.92
parseFunction · 0.92
NewParserFunction · 0.92
BenchmarkPhp7Function · 0.92
TestPhp7Function · 0.92
TestPhp5StringsFunction · 0.92
TestPhp5HeredocFunction · 0.92
ExamplePrettyJsonDumperFunction · 0.92
ExampleGoDumperFunction · 0.92
ExampleJsonDumperFunction · 0.92
ExampleDumperFunction · 0.92

Calls 1

NewLexerFunction · 0.92

Tested by 15

ExamplePrinterFunction · 0.74
parseFunction · 0.74
BenchmarkPhp7Function · 0.74
TestPhp7Function · 0.74
TestPhp5StringsFunction · 0.74
TestPhp5HeredocFunction · 0.74
ExamplePrettyJsonDumperFunction · 0.74
ExampleGoDumperFunction · 0.74
ExampleJsonDumperFunction · 0.74
ExampleDumperFunction · 0.74
TestIdentifierFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…