Chris@0: Error recovery Chris@0: ----- Chris@0: Chris@0: ; Chris@0: ----- Chris@0: !!positions Chris@0: Syntax error, unexpected ';', expecting T_STRING or T_VARIABLE or '{' or '$' from 3:1 to 3:1 Chris@0: array( Chris@13: 0: Stmt_Expression[2:1 - 3:1]( Chris@13: expr: Expr_PropertyFetch[2:1 - 2:6]( Chris@13: var: Expr_Variable[2:1 - 2:4]( Chris@13: name: foo Chris@13: ) Chris@13: name: Expr_Error[3:1 - 2:6]( Chris@13: ) Chris@0: ) Chris@0: ) Chris@0: ) Chris@0: ----- Chris@0: Chris@0: } Chris@0: ----- Chris@0: !!positions Chris@0: Syntax error, unexpected '}', expecting T_STRING or T_VARIABLE or '{' or '$' from 4:1 to 4:1 Chris@0: array( Chris@0: 0: Stmt_Function[2:1 - 4:1]( Chris@0: byRef: false Chris@13: name: Identifier[2:10 - 2:12]( Chris@13: name: foo Chris@13: ) Chris@0: params: array( Chris@0: ) Chris@0: returnType: null Chris@0: stmts: array( Chris@13: 0: Stmt_Expression[3:5 - 3:10]( Chris@13: expr: Expr_PropertyFetch[3:5 - 3:10]( Chris@13: var: Expr_Variable[3:5 - 3:8]( Chris@13: name: bar Chris@13: ) Chris@13: name: Expr_Error[4:1 - 3:10]( Chris@13: ) Chris@0: ) Chris@0: ) Chris@0: ) Chris@0: ) Chris@0: ) Chris@0: ----- Chris@0: value $oopsAnotherValue->get() Chris@17: ]; Chris@17: $array = [ Chris@17: $value $oopsAnotherValue Chris@17: ]; Chris@17: $array = [ Chris@17: 'key' => $value $oopsAnotherValue Chris@17: ]; Chris@17: ----- Chris@17: !!php7 Chris@17: Syntax error, unexpected T_VARIABLE, expecting ',' or ')' or ']' from 3:18 to 3:34 Chris@17: Syntax error, unexpected T_VARIABLE, expecting ',' or ')' or ']' from 6:12 to 6:28 Chris@17: Syntax error, unexpected T_VARIABLE, expecting ',' or ')' or ']' from 9:21 to 9:37 Chris@17: array( Chris@17: 0: Stmt_Expression( Chris@17: expr: Expr_Assign( Chris@17: var: Expr_Variable( Chris@17: name: array Chris@17: ) Chris@17: expr: Expr_Array( Chris@17: items: array( Chris@17: 0: Expr_ArrayItem( Chris@17: key: null Chris@17: value: Expr_PropertyFetch( Chris@17: var: Expr_Variable( Chris@17: name: this Chris@17: ) Chris@17: name: Identifier( Chris@17: name: value Chris@17: ) Chris@17: ) Chris@17: byRef: false Chris@17: ) Chris@17: 1: Expr_ArrayItem( Chris@17: key: null Chris@17: value: Expr_MethodCall( Chris@17: var: Expr_Variable( Chris@17: name: oopsAnotherValue Chris@17: ) Chris@17: name: Identifier( Chris@17: name: get Chris@17: ) Chris@17: args: array( Chris@17: ) Chris@17: ) Chris@17: byRef: false Chris@17: ) Chris@17: ) Chris@17: ) Chris@17: ) Chris@17: ) Chris@17: 1: Stmt_Expression( Chris@17: expr: Expr_Assign( Chris@17: var: Expr_Variable( Chris@17: name: array Chris@17: ) Chris@17: expr: Expr_Array( Chris@17: items: array( Chris@17: 0: Expr_ArrayItem( Chris@17: key: null Chris@17: value: Expr_Variable( Chris@17: name: value Chris@17: ) Chris@17: byRef: false Chris@17: ) Chris@17: 1: Expr_ArrayItem( Chris@17: key: null Chris@17: value: Expr_Variable( Chris@17: name: oopsAnotherValue Chris@17: ) Chris@17: byRef: false Chris@17: ) Chris@17: ) Chris@17: ) Chris@17: ) Chris@17: ) Chris@17: 2: Stmt_Expression( Chris@17: expr: Expr_Assign( Chris@17: var: Expr_Variable( Chris@17: name: array Chris@17: ) Chris@17: expr: Expr_Array( Chris@17: items: array( Chris@17: 0: Expr_ArrayItem( Chris@17: key: Scalar_String( Chris@17: value: key Chris@17: ) Chris@17: value: Expr_Variable( Chris@17: name: value Chris@17: ) Chris@17: byRef: false Chris@17: ) Chris@17: 1: Expr_ArrayItem( Chris@17: key: null Chris@17: value: Expr_Variable( Chris@17: name: oopsAnotherValue Chris@17: ) Chris@17: byRef: false Chris@17: ) Chris@17: ) Chris@17: ) Chris@17: ) Chris@17: ) Chris@17: ) Chris@17: ----- Chris@17: