{"modulePath":"github.com/wudi/php-parser","version":"v0.1.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package parser\n\nPackage parser with object pooling to reduce allocations.\n\n## Functions\n\n```go\nfunc TestParsing_ArrayExpression(t *testing.T)\n```\nTestParsing\\_ArrayExpression 数组表达式测试\n\n```go\nfunc TestParsing_ArrayTrailingCommas(t *testing.T)\n```\nTestParsing\\_ArrayTrailingCommas 数组尾随逗号测试\n\n```go\nfunc TestParsing_BitwiseOperations(t *testing.T)\n```\nTestParsing\\_BitwiseOperations 位运算测试\n\n```go\nfunc TestParsing_FunctionReturnTypes(t *testing.T)\n```\nTestParsing\\_FunctionReturnTypes 函数返回类型测试\n\n```go\nfunc TestParsing_GroupedExpression(t *testing.T)\n```\nTestParsing\\_GroupedExpression 分组表达式测试\n\n```go\nfunc TestParsing_HeredocStrings(t *testing.T)\n```\nTestParsing\\_HeredocStrings Heredoc字符串测试\n\n```go\nfunc TestParsing_NowdocStrings(t *testing.T)\n```\nTestParsing\\_NowdocStrings Nowdoc字符串测试\n\n```go\nfunc TestParsing_OperatorPrecedence(t *testing.T)\n```\nTestParsing\\_OperatorPrecedence 操作符优先级测试\n\n```go\nfunc TestParsing_StringInterpolation(t *testing.T)\n```\nTestParsing\\_StringInterpolation 字符串插值测试\n\n```go\nfunc TestParsing_TypedParameters(t *testing.T)\n```\nTestParsing\\_TypedParameters 类型化参数测试\n\n## Types\n\n```go\ntype InfixParseFn func(*Parser, ast.Expression) ast.Expression\n```\n\n```go\ntype Parser struct {\n\t// contains filtered or unexported fields\n}\n```\nParser 解析器结构体\n\n```go\nfunc New(l *lexer.Lexer) *Parser\n```\n\n```go\nfunc NewFromPool(l *lexer.Lexer) *Parser\n```\nNewFromPool 从对象池中获取一个 Parser 实例\n\n```go\nfunc (p *Parser) Errors() []string\n```\nErrors 获取解析错误\n\n```go\nfunc (p *Parser) ParseProgram() *ast.Program\n```\nParseProgram 解析整个程序\n\n```go\nfunc (p *Parser) Release()\n```\nRelease 将 Parser 归还给对象池\n\n```go\ntype Precedence int\n```\nPrecedence 操作符优先级 - 根据 PHP 官方优先级顺序\n\n```go\nconst (\n\tLOWEST        Precedence\n\tASSIGN        // = += -= *= /= .= %= \u0026= |= ^= \u003c\u003c= \u003e\u003e= **= ??=\n\tTERNARY       // ? :\n\tCOALESCE      // ??\n\tLOGICAL_OR    // || or\n\tLOGICAL_AND   // \u0026\u0026 and\n\tBITWISE_OR    // |\n\tBITWISE_XOR   // ^\n\tBITWISE_AND   // \u0026\n\tEQUALS        // == != === !==\n\tLESSGREATER   // \u003c \u003c= \u003e \u003e= \u003c=\u003e instanceof\n\tBITWISE_SHIFT // \u003c\u003c \u003e\u003e\n\tSUM           // + - .\n\tPRODUCT       // * / %\n\tEXPONENT      // **\n\tPREFIX        // ! ~ -X +X ++X --X (int) (float) (string) (array) (object) (bool) @\n\tPOSTFIX       // X++ X--\n\tCALL          // myFunction(X) $obj-\u003eprop Class::$prop\n\tINDEX         // array[index]\n)\n```\n\n```go\ntype PrefixParseFn func(*Parser) ast.Expression\n```\n\n","path":"github.com/wudi/php-parser/parser","name":"parser","synopsis":"Package parser with object pooling to reduce allocations.","isRedistributable":true}
