Documentation
¶
Overview ¶
Package parser with object pooling to reduce allocations.
Index ¶
- func TestParsing_ArrayExpression(t *testing.T)
- func TestParsing_ArrayTrailingCommas(t *testing.T)
- func TestParsing_BitwiseOperations(t *testing.T)
- func TestParsing_FunctionReturnTypes(t *testing.T)
- func TestParsing_GroupedExpression(t *testing.T)
- func TestParsing_HeredocStrings(t *testing.T)
- func TestParsing_NowdocStrings(t *testing.T)
- func TestParsing_OperatorPrecedence(t *testing.T)
- func TestParsing_StringInterpolation(t *testing.T)
- func TestParsing_TypedParameters(t *testing.T)
- type InfixParseFn
- type Parser
- type Precedence
- type PrefixParseFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestParsing_ArrayExpression ¶
TestParsing_ArrayExpression 数组表达式测试
func TestParsing_ArrayTrailingCommas ¶
TestParsing_ArrayTrailingCommas 数组尾随逗号测试
func TestParsing_BitwiseOperations ¶
TestParsing_BitwiseOperations 位运算测试
func TestParsing_FunctionReturnTypes ¶
TestParsing_FunctionReturnTypes 函数返回类型测试
func TestParsing_GroupedExpression ¶
TestParsing_GroupedExpression 分组表达式测试
func TestParsing_HeredocStrings ¶
TestParsing_HeredocStrings Heredoc字符串测试
func TestParsing_NowdocStrings ¶
TestParsing_NowdocStrings Nowdoc字符串测试
func TestParsing_OperatorPrecedence ¶
TestParsing_OperatorPrecedence 操作符优先级测试
func TestParsing_StringInterpolation ¶
TestParsing_StringInterpolation 字符串插值测试
func TestParsing_TypedParameters ¶
TestParsing_TypedParameters 类型化参数测试
Types ¶
type InfixParseFn ¶
type InfixParseFn func(*Parser, ast.Expression) ast.Expression
type Precedence ¶
type Precedence int
Precedence 操作符优先级 - 根据 PHP 官方优先级顺序
const ( LOWEST Precedence ASSIGN // = += -= *= /= .= %= &= |= ^= <<= >>= **= ??= TERNARY // ? : COALESCE // ?? LOGICAL_OR // || or LOGICAL_AND // && and BITWISE_OR // | BITWISE_XOR // ^ BITWISE_AND // & EQUALS // == != === !== LESSGREATER // < <= > >= <=> instanceof BITWISE_SHIFT // << >> SUM // + - . PRODUCT // * / % EXPONENT // ** PREFIX // ! ~ -X +X ++X --X (int) (float) (string) (array) (object) (bool) @ POSTFIX // X++ X-- CALL // myFunction(X) $obj->prop Class::$prop INDEX // array[index] )
type PrefixParseFn ¶
type PrefixParseFn func(*Parser) ast.Expression
Source Files
¶
Click to show internal directories.
Click to hide internal directories.