From dbcae9142ef6ae092ee1d3af7554117cdbddb92c Mon Sep 17 00:00:00 2001 From: Timothy Clem Date: Fri, 24 Jan 2020 10:17:34 -0800 Subject: [PATCH] Parse fixture updates for the remaining languages --- .../corpus/anonymous-function.parseA.txt | 40 +- .../corpus/anonymous-function.parseB.txt | 40 +- ...nonymous-parameterless-function.parseA.txt | 19 +- ...nonymous-parameterless-function.parseB.txt | 19 +- .../javascript/corpus/array.parseA.txt | 10 +- .../javascript/corpus/array.parseB.txt | 13 +- .../corpus/arrow-function.parseA.txt | 33 +- .../corpus/arrow-function.parseB.txt | 33 +- .../corpus/assignment-pattern.parseA.txt | 22 +- .../corpus/assignment-pattern.parseB.txt | 22 +- .../javascript/corpus/assignment.parseA.txt | 12 +- .../javascript/corpus/assignment.parseB.txt | 12 +- .../corpus/bitwise-operator.parseA.txt | 14 +- .../corpus/bitwise-operator.parseB.txt | 14 +- .../corpus/boolean-operator.parseA.txt | 14 +- .../corpus/boolean-operator.parseB.txt | 14 +- .../javascript/corpus/break.parseA.txt | 65 ++- .../javascript/corpus/break.parseB.txt | 65 ++- .../corpus/chained-callbacks.parseA.txt | 44 +- .../corpus/chained-callbacks.parseB.txt | 44 +- .../corpus/chained-property-access.parseA.txt | 54 ++- .../corpus/chained-property-access.parseB.txt | 54 ++- .../javascript/corpus/class.parseA.txt | 91 ++-- .../javascript/corpus/class.parseB.txt | 82 ++-- .../corpus/comma-operator.parseA.txt | 22 +- .../corpus/comma-operator.parseB.txt | 38 +- .../javascript/corpus/comment.parseA.txt | 5 +- .../javascript/corpus/comment.parseB.txt | 5 +- .../corpus/constructor-call.parseA.txt | 22 +- .../corpus/constructor-call.parseB.txt | 22 +- .../javascript/corpus/continue.parseA.txt | 65 ++- .../javascript/corpus/continue.parseB.txt | 65 ++- .../corpus/delete-operator.parseA.txt | 17 +- .../corpus/delete-operator.parseB.txt | 16 +- .../corpus/do-while-statement.parseA.txt | 30 +- .../corpus/do-while-statement.parseB.txt | 30 +- .../javascript/corpus/export.parseA.txt | 151 ++++--- .../javascript/corpus/export.parseB.txt | 151 ++++--- .../javascript/corpus/false.parseA.txt | 7 +- .../javascript/corpus/false.parseB.txt | 8 +- .../corpus/for-in-statement.parseA.txt | 23 +- .../corpus/for-in-statement.parseB.txt | 23 +- .../for-loop-with-in-statement.parseA.txt | 59 ++- .../for-loop-with-in-statement.parseB.txt | 59 ++- .../corpus/for-of-statement.parseA.txt | 29 +- .../corpus/for-of-statement.parseB.txt | 29 +- .../corpus/for-statement.parseA.txt | 58 ++- .../corpus/for-statement.parseB.txt | 58 ++- .../corpus/function-call-args.parseA.txt | 68 +-- .../corpus/function-call-args.parseB.txt | 68 +-- .../corpus/function-call.parseA.txt | 18 +- .../corpus/function-call.parseB.txt | 18 +- .../javascript/corpus/function.parseA.txt | 32 +- .../javascript/corpus/function.parseB.txt | 32 +- .../corpus/generator-function.parseA.txt | 44 +- .../corpus/generator-function.parseB.txt | 44 +- .../javascript/corpus/identifier.parseA.txt | 7 +- .../javascript/corpus/identifier.parseB.txt | 7 +- .../javascript/corpus/if-else.parseA.txt | 55 ++- .../javascript/corpus/if-else.parseB.txt | 61 ++- test/fixtures/javascript/corpus/if.parseA.txt | 26 +- test/fixtures/javascript/corpus/if.parseB.txt | 36 +- .../javascript/corpus/import.parseA.txt | 74 ++- .../javascript/corpus/import.parseB.txt | 74 ++- .../fixtures/javascript/corpus/jsx.parseA.txt | 45 +- .../fixtures/javascript/corpus/jsx.parseB.txt | 48 +- .../math-assignment-operator.parseA.txt | 13 +- .../math-assignment-operator.parseB.txt | 13 +- .../corpus/math-operator.parseA.txt | 35 +- .../corpus/math-operator.parseB.txt | 35 +- .../member-access-assignment.parseA.txt | 17 +- .../member-access-assignment.parseB.txt | 17 +- .../corpus/member-access.parseA.txt | 12 +- .../corpus/member-access.parseB.txt | 12 +- .../javascript/corpus/method-call.parseA.txt | 23 +- .../javascript/corpus/method-call.parseB.txt | 23 +- .../corpus/named-function.parseA.txt | 35 +- .../corpus/named-function.parseB.txt | 22 +- .../nested-do-while-in-function.parseA.txt | 50 ++- .../nested-do-while-in-function.parseB.txt | 50 ++- .../corpus/nested-functions.parseA.txt | 88 ++-- .../corpus/nested-functions.parseB.txt | 88 ++-- .../javascript/corpus/null.parseA.txt | 7 +- .../javascript/corpus/null.parseB.txt | 8 +- .../javascript/corpus/number.parseA.txt | 7 +- .../javascript/corpus/number.parseB.txt | 7 +- .../javascript/corpus/object.parseA.txt | 14 +- .../javascript/corpus/object.parseB.txt | 28 +- .../corpus/objects-with-methods.parseA.txt | 45 +- .../corpus/objects-with-methods.parseB.txt | 45 +- .../javascript/corpus/regex.parseA.txt | 9 +- .../javascript/corpus/regex.parseB.txt | 9 +- .../corpus/relational-operator.parseA.txt | 14 +- .../corpus/relational-operator.parseB.txt | 14 +- .../corpus/return-statement.parseA.txt | 8 +- .../corpus/return-statement.parseB.txt | 6 +- .../javascript/corpus/string.parseA.txt | 7 +- .../javascript/corpus/string.parseB.txt | 7 +- .../subscript-access-assignment.parseA.txt | 18 +- .../subscript-access-assignment.parseB.txt | 18 +- .../corpus/subscript-access-string.parseA.txt | 13 +- .../corpus/subscript-access-string.parseB.txt | 13 +- .../subscript-access-variable.parseA.txt | 13 +- .../subscript-access-variable.parseB.txt | 13 +- .../corpus/switch-statement.parseA.txt | 47 +- .../corpus/switch-statement.parseB.txt | 47 +- .../corpus/template-string.parseA.txt | 7 +- .../corpus/template-string.parseB.txt | 7 +- .../javascript/corpus/ternary.parseA.txt | 16 +- .../javascript/corpus/ternary.parseB.txt | 46 +- .../corpus/this-expression.parseA.txt | 7 +- .../corpus/this-expression.parseB.txt | 8 +- .../corpus/throw-statement.parseA.txt | 15 +- .../corpus/throw-statement.parseB.txt | 15 +- .../javascript/corpus/true.parseA.txt | 7 +- .../javascript/corpus/true.parseB.txt | 8 +- .../corpus/try-statement.parseA.txt | 34 +- .../corpus/try-statement.parseB.txt | 34 +- .../corpus/type-operator.parseA.txt | 11 +- .../corpus/type-operator.parseB.txt | 14 +- .../javascript/corpus/undefined.parseA.txt | 7 +- .../javascript/corpus/undefined.parseB.txt | 8 +- .../corpus/var-declaration.parseA.txt | 14 +- .../corpus/var-declaration.parseB.txt | 26 +- .../javascript/corpus/variable.parseA.txt | 7 +- .../javascript/corpus/variable.parseB.txt | 7 +- .../corpus/void-operator.parseA.txt | 16 +- .../corpus/void-operator.parseB.txt | 16 +- .../corpus/while-statement.parseA.txt | 25 +- .../corpus/while-statement.parseB.txt | 25 +- .../javascript/corpus/yield.parseA.txt | 33 +- .../javascript/corpus/yield.parseB.txt | 37 +- test/fixtures/json/corpus/array.diffA-B.txt | 0 test/fixtures/json/corpus/array.parseA.txt | 21 +- test/fixtures/json/corpus/array.parseB.txt | 21 +- .../python/corpus/assert-statement.parseA.txt | 26 +- .../python/corpus/assert-statement.parseB.txt | 27 +- .../python/corpus/assignment.parseA.txt | 59 ++- .../python/corpus/assignment.parseB.txt | 59 ++- .../async-function-definition.parseA.txt | 56 ++- .../async-function-definition.parseB.txt | 56 ++- .../python/corpus/attribute.parseA.txt | 13 +- .../python/corpus/attribute.parseB.txt | 18 +- .../corpus/augmented-assignment.parseA.txt | 50 ++- .../corpus/augmented-assignment.parseB.txt | 50 ++- test/fixtures/python/corpus/await.parseA.txt | 31 +- test/fixtures/python/corpus/await.parseB.txt | 31 +- .../python/corpus/binary-operator.parseA.txt | 158 +++++-- .../python/corpus/binary-operator.parseB.txt | 158 +++++-- .../python/corpus/boolean-operator.parseA.txt | 30 +- .../python/corpus/boolean-operator.parseB.txt | 30 +- .../fixtures/python/corpus/boolean.parseA.txt | 20 +- .../fixtures/python/corpus/boolean.parseB.txt | 20 +- .../python/corpus/break-statement.parseA.txt | 6 +- .../python/corpus/break-statement.parseB.txt | 10 +- test/fixtures/python/corpus/call.parseA.txt | 47 +- test/fixtures/python/corpus/call.parseB.txt | 67 ++- .../python/corpus/class-definition.parseA.txt | 118 +++-- .../python/corpus/class-definition.parseB.txt | 106 +++-- .../fixtures/python/corpus/comment.parseA.txt | 6 +- .../fixtures/python/corpus/comment.parseB.txt | 7 +- .../corpus/comparison-operator.parseA.txt | 116 +++-- .../corpus/comparison-operator.parseB.txt | 116 +++-- .../corpus/concatenated-string.parseA.txt | 14 +- .../corpus/concatenated-string.parseB.txt | 16 +- .../corpus/conditional-expression.parseA.txt | 49 +- .../corpus/conditional-expression.parseB.txt | 54 ++- .../corpus/continue-statement.parseA.txt | 6 +- .../corpus/continue-statement.parseB.txt | 10 +- .../corpus/decorated-definition.parseA.txt | 132 ++++-- .../corpus/decorated-definition.parseB.txt | 93 ++-- .../python/corpus/delete-statement.parseA.txt | 30 +- .../python/corpus/delete-statement.parseB.txt | 30 +- .../dictionary-comprehension.parseA.txt | 60 ++- .../dictionary-comprehension.parseB.txt | 60 ++- .../python/corpus/dictionary.parseA.txt | 50 ++- .../python/corpus/dictionary.parseB.txt | 60 ++- .../python/corpus/dotted-name.parseA.txt | 29 +- .../python/corpus/dotted-name.parseB.txt | 29 +- .../python/corpus/ellipsis.parseA.txt | 14 +- .../python/corpus/ellipsis.parseB.txt | 8 +- .../python/corpus/exec-statement.parseA.txt | 35 +- .../python/corpus/exec-statement.parseB.txt | 35 +- .../corpus/expression-statement.parseA.txt | 51 ++- .../corpus/expression-statement.parseB.txt | 51 ++- test/fixtures/python/corpus/float.parseA.txt | 69 ++- test/fixtures/python/corpus/float.parseB.txt | 69 ++- .../python/corpus/for-statement.parseA.txt | 112 +++-- .../python/corpus/for-statement.parseB.txt | 112 +++-- .../corpus/function-definition.parseA.txt | 118 +++-- .../corpus/function-definition.parseB.txt | 95 ++-- .../corpus/future_import_statement.parseA.txt | 33 +- .../corpus/future_import_statement.parseB.txt | 33 +- .../corpus/generator-expression.parseA.txt | 42 +- .../corpus/generator-expression.parseB.txt | 49 +- .../python/corpus/global-statement.parseA.txt | 18 +- .../python/corpus/global-statement.parseB.txt | 18 +- .../python/corpus/identifier.parseA.txt | 8 +- .../python/corpus/identifier.parseB.txt | 14 +- .../python/corpus/if-statement.parseA.txt | 60 ++- .../python/corpus/if-statement.parseB.txt | 24 +- .../corpus/import-from-statement.parseA.txt | 54 ++- .../corpus/import-from-statement.parseB.txt | 73 +-- .../python/corpus/import-statement.parseA.txt | 39 +- .../python/corpus/import-statement.parseB.txt | 32 +- .../fixtures/python/corpus/integer.parseA.txt | 88 +++- .../fixtures/python/corpus/integer.parseB.txt | 88 +++- .../corpus/keyword-identifier.parseA.txt | 14 +- .../corpus/keyword-identifier.parseB.txt | 14 +- test/fixtures/python/corpus/lambda.parseA.txt | 20 +- test/fixtures/python/corpus/lambda.parseB.txt | 24 +- .../corpus/list-comprehension.parseA.txt | 48 +- .../corpus/list-comprehension.parseB.txt | 80 +++- test/fixtures/python/corpus/list.parseA.txt | 44 +- test/fixtures/python/corpus/list.parseB.txt | 36 +- .../corpus/non-local-statement.parseA.txt | 9 +- .../corpus/non-local-statement.parseB.txt | 9 +- test/fixtures/python/corpus/none.parseA.txt | 14 +- test/fixtures/python/corpus/none.parseB.txt | 8 +- test/fixtures/python/corpus/not.parseA.txt | 11 +- test/fixtures/python/corpus/not.parseB.txt | 20 +- .../python/corpus/pass-statement.parseA.txt | 6 +- .../python/corpus/pass-statement.parseB.txt | 10 +- .../python/corpus/print-statement.parseA.txt | 70 +-- .../python/corpus/print-statement.parseB.txt | 70 +-- .../python/corpus/raise-statement.parseA.txt | 45 +- .../python/corpus/raise-statement.parseB.txt | 45 +- .../python/corpus/return-statement.parseA.txt | 37 +- .../python/corpus/return-statement.parseB.txt | 37 +- .../corpus/set-comprehension.parseA.txt | 42 +- .../corpus/set-comprehension.parseB.txt | 49 +- test/fixtures/python/corpus/set.parseA.txt | 26 +- test/fixtures/python/corpus/set.parseB.txt | 30 +- test/fixtures/python/corpus/slice.parseA.txt | 72 +-- test/fixtures/python/corpus/slice.parseB.txt | 72 +-- test/fixtures/python/corpus/string.parseA.txt | 58 ++- test/fixtures/python/corpus/string.parseB.txt | 51 ++- .../python/corpus/subscript.parseA.txt | 15 +- .../python/corpus/subscript.parseB.txt | 15 +- .../python/corpus/try-statement.parseA.txt | 143 ++++-- .../python/corpus/try-statement.parseB.txt | 94 ++-- test/fixtures/python/corpus/tuple.parseA.txt | 34 +- test/fixtures/python/corpus/tuple.parseB.txt | 43 +- .../python/corpus/unary-operator.parseA.txt | 31 +- .../python/corpus/unary-operator.parseB.txt | 31 +- .../python/corpus/while-statement.parseA.txt | 23 +- .../python/corpus/while-statement.parseB.txt | 23 +- .../python/corpus/with-statement.parseA.txt | 22 +- .../python/corpus/with-statement.parseB.txt | 22 +- test/fixtures/python/corpus/with.parseA.txt | 71 ++- test/fixtures/python/corpus/with.parseB.txt | 100 +++-- test/fixtures/python/corpus/yield.parseA.txt | 7 +- test/fixtures/python/corpus/yield.parseB.txt | 12 +- test/fixtures/ruby/corpus/alias.parseA.txt | 62 +-- test/fixtures/ruby/corpus/and-or.parseA.txt | 20 +- test/fixtures/ruby/corpus/and-or.parseB.txt | 49 +- test/fixtures/ruby/corpus/array.parseA.txt | 19 +- test/fixtures/ruby/corpus/array.parseB.txt | 19 +- .../ruby/corpus/assignment.parseA.txt | 13 +- .../ruby/corpus/assignment.parseB.txt | 13 +- .../ruby/corpus/begin-block.parseA.txt | 13 +- .../ruby/corpus/begin-block.parseB.txt | 21 +- test/fixtures/ruby/corpus/begin.parseA.txt | 18 +- test/fixtures/ruby/corpus/begin.parseB.txt | 28 +- test/fixtures/ruby/corpus/binary.parseA.txt | 421 +++++++++++++----- .../ruby/corpus/bitwise-operator.parseA.txt | 56 ++- .../ruby/corpus/bitwise-operator.parseB.txt | 38 +- .../ruby/corpus/boolean-operator.parseA.txt | 20 +- .../ruby/corpus/boolean-operator.parseB.txt | 20 +- test/fixtures/ruby/corpus/break.parseA.txt | 19 +- test/fixtures/ruby/corpus/break.parseB.txt | 20 +- test/fixtures/ruby/corpus/calls.parseA.txt | 123 +++-- .../ruby/corpus/chained-string.parseA.txt | 11 +- test/fixtures/ruby/corpus/class.parseA.txt | 41 +- test/fixtures/ruby/corpus/class.parseB.txt | 19 +- test/fixtures/ruby/corpus/comment.parseA.txt | 5 +- test/fixtures/ruby/corpus/comment.parseB.txt | 5 +- .../corpus/comparision-operator.parseA.txt | 38 +- .../corpus/comparision-operator.parseB.txt | 38 +- .../corpus/conditional-assignment.parseA.txt | 14 +- .../corpus/conditional-assignment.parseB.txt | 14 +- .../fixtures/ruby/corpus/delimiter.parseA.txt | 32 +- .../fixtures/ruby/corpus/delimiter.parseB.txt | 32 +- .../ruby/corpus/element-reference.parseA.txt | 60 ++- .../ruby/corpus/element-reference.parseB.txt | 34 +- test/fixtures/ruby/corpus/else.parseA.txt | 19 +- test/fixtures/ruby/corpus/else.parseB.txt | 25 +- test/fixtures/ruby/corpus/elsif.parseA.txt | 36 +- test/fixtures/ruby/corpus/elsif.parseB.txt | 44 +- .../ruby/corpus/empty-statement.parseA.txt | 4 +- .../fixtures/ruby/corpus/end-block.parseA.txt | 13 +- .../fixtures/ruby/corpus/end-block.parseB.txt | 21 +- test/fixtures/ruby/corpus/ensure.parseA.txt | 19 +- test/fixtures/ruby/corpus/ensure.parseB.txt | 26 +- test/fixtures/ruby/corpus/for.parseA.txt | 130 ++++-- test/fixtures/ruby/corpus/for.parseB.txt | 45 +- test/fixtures/ruby/corpus/hash.parseA.txt | 82 ++-- test/fixtures/ruby/corpus/hash.parseB.txt | 32 +- test/fixtures/ruby/corpus/heredoc.parseA.txt | 9 +- test/fixtures/ruby/corpus/heredoc.parseB.txt | 24 +- .../corpus/if-unless-modifiers.parseA.txt | 22 +- .../corpus/if-unless-modifiers.parseB.txt | 21 +- test/fixtures/ruby/corpus/if.parseA.txt | 54 ++- test/fixtures/ruby/corpus/if.parseB.txt | 34 +- .../ruby/corpus/interpolation.parseA.txt | 32 +- .../ruby/corpus/interpolation.parseB.txt | 32 +- test/fixtures/ruby/corpus/keywords.parseA.txt | 24 +- .../ruby/corpus/lambda-dash-rocket.parseA.txt | 29 +- .../ruby/corpus/lambda-dash-rocket.parseB.txt | 19 +- test/fixtures/ruby/corpus/lambda.parseA.txt | 126 ++++-- test/fixtures/ruby/corpus/lambda.parseB.txt | 28 +- test/fixtures/ruby/corpus/literals.parseA.txt | 70 ++- .../ruby/corpus/math-assignment.parseA.txt | 62 ++- .../ruby/corpus/math-assignment.parseB.txt | 62 ++- .../corpus/method-calls-hash-args.parseA.txt | 18 +- .../corpus/method-calls-hash-args.parseB.txt | 26 +- .../method-calls-keyword-args.parseA.txt | 18 +- .../method-calls-keyword-args.parseB.txt | 26 +- .../ruby/corpus/method-calls.parseA.txt | 121 +++-- .../ruby/corpus/method-calls.parseB.txt | 9 +- ...ethod-declaration-keyword-param.parseA.txt | 13 +- ...ethod-declaration-keyword-param.parseB.txt | 20 +- ...ethod-declaration-param-default.parseA.txt | 13 +- ...ethod-declaration-param-default.parseB.txt | 20 +- .../method-declaration-params.parseA.txt | 15 +- .../method-declaration-params.parseB.txt | 19 +- ...laration-required-keyword-param.parseA.txt | 13 +- ...laration-required-keyword-param.parseB.txt | 16 +- ...ethod-declaration-unnamed-param.parseA.txt | 15 +- ...ethod-declaration-unnamed-param.parseB.txt | 17 +- .../ruby/corpus/method-declaration.parseA.txt | 12 +- .../ruby/corpus/method-declaration.parseB.txt | 23 +- .../ruby/corpus/method-invocation.parseA.txt | 32 +- .../ruby/corpus/method-invocation.parseB.txt | 56 ++- test/fixtures/ruby/corpus/methods.parseA.txt | 122 +++-- test/fixtures/ruby/corpus/misc.parseA.txt | 73 +-- test/fixtures/ruby/corpus/module.parseA.txt | 23 +- test/fixtures/ruby/corpus/module.parseB.txt | 19 +- .../corpus/multiple-assignments.parseA.txt | 205 ++++++--- .../corpus/multiple-assignments.parseB.txt | 32 +- test/fixtures/ruby/corpus/next.parseA.txt | 26 +- test/fixtures/ruby/corpus/number.parseA.txt | 37 +- test/fixtures/ruby/corpus/number.parseB.txt | 37 +- .../ruby/corpus/percent-array.parseA.txt | 11 +- .../ruby/corpus/percent-array.parseB.txt | 23 +- .../ruby/corpus/pseudo-variables.parseA.txt | 27 +- .../ruby/corpus/pseudo-variables.parseB.txt | 27 +- test/fixtures/ruby/corpus/regex.parseA.txt | 7 +- test/fixtures/ruby/corpus/regex.parseB.txt | 12 +- .../corpus/relational-operator.parseA.txt | 57 ++- .../corpus/relational-operator.parseB.txt | 55 ++- test/fixtures/ruby/corpus/require.parseA.txt | 26 +- test/fixtures/ruby/corpus/require.parseB.txt | 27 +- .../ruby/corpus/rescue-empty.parseA.txt | 20 +- .../ruby/corpus/rescue-empty.parseB.txt | 28 +- .../ruby/corpus/rescue-last-ex.parseA.txt | 35 +- .../ruby/corpus/rescue-last-ex.parseB.txt | 43 +- .../ruby/corpus/rescue-modifier.parseA.txt | 20 +- .../ruby/corpus/rescue-modifier.parseB.txt | 20 +- .../ruby/corpus/rescue-modifier2.parseA.txt | 20 +- .../ruby/corpus/rescue-modifier2.parseB.txt | 20 +- test/fixtures/ruby/corpus/rescue.parseA.txt | 154 ++++--- test/fixtures/ruby/corpus/rescue.parseB.txt | 37 +- test/fixtures/ruby/corpus/return.parseA.txt | 13 +- test/fixtures/ruby/corpus/return.parseB.txt | 6 +- .../ruby/corpus/singleton-class.parseA.txt | 42 +- test/fixtures/ruby/corpus/string.parseA.txt | 12 +- test/fixtures/ruby/corpus/string.parseB.txt | 12 +- test/fixtures/ruby/corpus/subshell.parseA.txt | 7 +- test/fixtures/ruby/corpus/subshell.parseB.txt | 7 +- test/fixtures/ruby/corpus/symbol.parseA.txt | 17 +- test/fixtures/ruby/corpus/symbol.parseB.txt | 17 +- test/fixtures/ruby/corpus/ternary.parseA.txt | 27 +- test/fixtures/ruby/corpus/ternary.parseB.txt | 27 +- test/fixtures/ruby/corpus/unary.parseA.txt | 69 ++- test/fixtures/ruby/corpus/undef.parseA.txt | 55 +-- test/fixtures/ruby/corpus/unless.parseA.txt | 35 +- test/fixtures/ruby/corpus/unless.parseB.txt | 36 +- test/fixtures/ruby/corpus/until.parseA.txt | 36 +- test/fixtures/ruby/corpus/until.parseB.txt | 24 +- .../fixtures/ruby/corpus/when-else.parseA.txt | 60 ++- .../fixtures/ruby/corpus/when-else.parseB.txt | 69 ++- test/fixtures/ruby/corpus/when.parseA.txt | 50 ++- test/fixtures/ruby/corpus/when.parseB.txt | 66 ++- test/fixtures/ruby/corpus/while.parseA.txt | 34 +- test/fixtures/ruby/corpus/while.parseB.txt | 23 +- test/fixtures/ruby/corpus/yield.parseA.txt | 13 +- test/fixtures/ruby/corpus/yield.parseB.txt | 6 +- .../tsx/corpus/jsx-elements.parseA.txt | 105 +++-- .../tsx/corpus/jsx-elements.parseB.txt | 42 +- .../corpus/ambient-declarations.parseA.txt | 212 ++++----- .../corpus/ambient-declarations.parseB.txt | 100 +++-- .../corpus/ambient-exports.parseA.txt | 12 +- .../corpus/ambient-exports.parseB.txt | 45 +- .../ambient-type-declarations.parseA.txt | 40 +- .../ambient-type-declarations.parseB.txt | 37 +- .../corpus/anonymous-function.parseA.txt | 40 +- .../corpus/anonymous-function.parseB.txt | 40 +- ...nonymous-parameterless-function.parseA.txt | 19 +- ...nonymous-parameterless-function.parseB.txt | 19 +- .../typescript/corpus/array-type.parseA.txt | 17 +- .../typescript/corpus/array-type.parseB.txt | 19 +- .../typescript/corpus/array.parseA.txt | 10 +- .../typescript/corpus/array.parseB.txt | 13 +- .../corpus/arrow-function.parseA.txt | 33 +- .../corpus/arrow-function.parseB.txt | 33 +- .../corpus/assignment-pattern.parseA.txt | 22 +- .../corpus/assignment-pattern.parseB.txt | 22 +- .../typescript/corpus/assignment.parseA.txt | 12 +- .../typescript/corpus/assignment.parseB.txt | 12 +- .../corpus/bitwise-operator.parseA.txt | 14 +- .../corpus/bitwise-operator.parseB.txt | 14 +- .../corpus/boolean-operator.parseA.txt | 14 +- .../corpus/boolean-operator.parseB.txt | 14 +- .../typescript/corpus/break.parseA.txt | 65 ++- .../typescript/corpus/break.parseB.txt | 65 ++- .../corpus/chained-callbacks.parseA.txt | 44 +- .../corpus/chained-callbacks.parseB.txt | 44 +- .../corpus/chained-property-access.parseA.txt | 54 ++- .../corpus/chained-property-access.parseB.txt | 54 ++- .../typescript/corpus/class.parseA.txt | 103 ++--- .../typescript/corpus/class.parseB.txt | 94 ++-- .../corpus/comma-operator.parseA.txt | 22 +- .../corpus/comma-operator.parseB.txt | 38 +- .../typescript/corpus/comment.parseA.txt | 5 +- .../typescript/corpus/comment.parseB.txt | 5 +- .../corpus/constructor-call.parseA.txt | 22 +- .../corpus/constructor-call.parseB.txt | 22 +- .../typescript/corpus/continue.parseA.txt | 65 ++- .../typescript/corpus/continue.parseB.txt | 65 ++- .../corpus/delete-operator.parseA.txt | 17 +- .../corpus/delete-operator.parseB.txt | 16 +- .../corpus/do-while-statement.parseA.txt | 30 +- .../corpus/do-while-statement.parseB.txt | 30 +- .../corpus/export-assignments.parseA.txt | 7 +- .../corpus/export-assignments.parseB.txt | 8 +- .../typescript/corpus/export.parseA.txt | 151 ++++--- .../typescript/corpus/export.parseB.txt | 151 ++++--- .../typescript/corpus/false.parseA.txt | 7 +- .../typescript/corpus/false.parseB.txt | 8 +- .../corpus/for-in-statement.parseA.txt | 23 +- .../corpus/for-in-statement.parseB.txt | 23 +- .../for-loop-with-in-statement.parseA.txt | 59 ++- .../for-loop-with-in-statement.parseB.txt | 59 ++- .../corpus/for-of-statement.parseA.txt | 29 +- .../corpus/for-of-statement.parseB.txt | 29 +- .../corpus/for-statement.parseA.txt | 58 ++- .../corpus/for-statement.parseB.txt | 58 ++- .../corpus/function-call-args.parseA.txt | 68 +-- .../corpus/function-call-args.parseB.txt | 68 +-- .../corpus/function-call.parseA.txt | 21 +- .../corpus/function-call.parseB.txt | 21 +- .../corpus/function-type.parseA.txt | 19 +- .../corpus/function-type.parseB.txt | 17 +- .../typescript/corpus/function.parseA.txt | 42 +- .../typescript/corpus/function.parseB.txt | 35 +- .../corpus/generator-function.parseA.txt | 44 +- .../corpus/generator-function.parseB.txt | 44 +- .../typescript/corpus/identifier.parseA.txt | 7 +- .../typescript/corpus/identifier.parseB.txt | 7 +- .../typescript/corpus/if-else.parseA.txt | 55 ++- .../typescript/corpus/if-else.parseB.txt | 61 ++- test/fixtures/typescript/corpus/if.parseA.txt | 26 +- test/fixtures/typescript/corpus/if.parseB.txt | 36 +- .../typescript/corpus/import.parseA.txt | 81 +++- .../typescript/corpus/import.parseB.txt | 74 ++- .../typescript/corpus/interface.parseA.txt | 39 +- .../typescript/corpus/interface.parseB.txt | 32 +- .../corpus/intersection-type.parseA.txt | 19 +- .../corpus/intersection-type.parseB.txt | 19 +- .../math-assignment-operator.parseA.txt | 13 +- .../math-assignment-operator.parseB.txt | 13 +- .../corpus/math-operator.parseA.txt | 35 +- .../corpus/math-operator.parseB.txt | 35 +- .../member-access-assignment.parseA.txt | 17 +- .../member-access-assignment.parseB.txt | 17 +- .../corpus/member-access.parseA.txt | 12 +- .../corpus/member-access.parseB.txt | 12 +- .../typescript/corpus/method-call.parseA.txt | 23 +- .../typescript/corpus/method-call.parseB.txt | 23 +- .../corpus/method-definition.parseA.txt | 24 +- .../corpus/method-definition.parseB.txt | 25 +- .../corpus/module-declarations.parseA.txt | 9 +- .../corpus/module-declarations.parseB.txt | 12 +- .../corpus/named-function.parseA.txt | 35 +- .../corpus/named-function.parseB.txt | 22 +- .../nested-do-while-in-function.parseA.txt | 50 ++- .../nested-do-while-in-function.parseB.txt | 50 ++- .../corpus/nested-functions.parseA.txt | 88 ++-- .../corpus/nested-functions.parseB.txt | 88 ++-- .../typescript/corpus/null.parseA.txt | 7 +- .../typescript/corpus/null.parseB.txt | 8 +- .../typescript/corpus/number.parseA.txt | 7 +- .../typescript/corpus/number.parseB.txt | 7 +- .../typescript/corpus/object.parseA.txt | 14 +- .../typescript/corpus/object.parseB.txt | 28 +- .../corpus/objects-with-methods.parseA.txt | 45 +- .../corpus/objects-with-methods.parseB.txt | 45 +- .../corpus/public-field-definition.parseA.txt | 131 +++--- .../corpus/public-field-definition.parseB.txt | 134 +++--- .../typescript/corpus/regex.parseA.txt | 9 +- .../typescript/corpus/regex.parseB.txt | 9 +- .../corpus/relational-operator.parseA.txt | 14 +- .../corpus/relational-operator.parseB.txt | 14 +- .../corpus/return-statement.parseA.txt | 8 +- .../corpus/return-statement.parseB.txt | 6 +- .../typescript/corpus/string.parseA.txt | 7 +- .../typescript/corpus/string.parseB.txt | 7 +- .../subscript-access-assignment.parseA.txt | 18 +- .../subscript-access-assignment.parseB.txt | 18 +- .../corpus/subscript-access-string.parseA.txt | 13 +- .../corpus/subscript-access-string.parseB.txt | 13 +- .../subscript-access-variable.parseA.txt | 13 +- .../subscript-access-variable.parseB.txt | 13 +- .../corpus/switch-statement.parseA.txt | 47 +- .../corpus/switch-statement.parseB.txt | 47 +- .../corpus/template-string.parseA.txt | 7 +- .../corpus/template-string.parseB.txt | 7 +- .../typescript/corpus/ternary.parseA.txt | 16 +- .../typescript/corpus/ternary.parseB.txt | 46 +- .../corpus/this-expression.parseA.txt | 7 +- .../corpus/this-expression.parseB.txt | 8 +- .../corpus/throw-statement.parseA.txt | 15 +- .../corpus/throw-statement.parseB.txt | 15 +- .../typescript/corpus/true.parseA.txt | 7 +- .../typescript/corpus/true.parseB.txt | 8 +- .../corpus/try-statement.parseA.txt | 34 +- .../corpus/try-statement.parseB.txt | 34 +- .../typescript/corpus/tuple-type.parseA.txt | 19 +- .../typescript/corpus/tuple-type.parseB.txt | 19 +- .../corpus/type-assertions.parseA.txt | 14 +- .../corpus/type-assertions.parseB.txt | 12 +- .../corpus/type-operator.parseA.txt | 11 +- .../corpus/type-operator.parseB.txt | 14 +- .../typescript/corpus/typeof-types.parseA.txt | 30 +- .../typescript/corpus/typeof-types.parseB.txt | 30 +- .../typescript/corpus/undefined.parseA.txt | 7 +- .../typescript/corpus/undefined.parseB.txt | 8 +- .../typescript/corpus/union-type.parseA.txt | 19 +- .../typescript/corpus/union-type.parseB.txt | 17 +- .../corpus/var-declaration.parseA.txt | 14 +- .../corpus/var-declaration.parseB.txt | 26 +- .../typescript/corpus/variable.parseA.txt | 7 +- .../typescript/corpus/variable.parseB.txt | 7 +- .../corpus/void-operator.parseA.txt | 16 +- .../corpus/void-operator.parseB.txt | 16 +- .../corpus/while-statement.parseA.txt | 25 +- .../corpus/while-statement.parseB.txt | 25 +- .../typescript/corpus/yield.parseA.txt | 33 +- .../typescript/corpus/yield.parseB.txt | 37 +- 550 files changed, 12773 insertions(+), 6867 deletions(-) create mode 100644 test/fixtures/json/corpus/array.diffA-B.txt diff --git a/test/fixtures/javascript/corpus/anonymous-function.parseA.txt b/test/fixtures/javascript/corpus/anonymous-function.parseA.txt index a0268da01..69d7b866e 100644 --- a/test/fixtures/javascript/corpus/anonymous-function.parseA.txt +++ b/test/fixtures/javascript/corpus/anonymous-function.parseA.txt @@ -1,20 +1,20 @@ -(Statements - (Function - (Empty) - (Empty) - (Empty) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Return - (Plus - (Identifier) - (Identifier)))))) +(Program + (Statement + (ExpressionStatement + (Expression + (Function + (StatementBlock + (Statement + (ReturnStatement + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "a")) + (Expression + (Identifier "b"))))))) + (FormalParameters + (RequiredParameter + (Identifier "a")) + (RequiredParameter + (Identifier "b")))))))) diff --git a/test/fixtures/javascript/corpus/anonymous-function.parseB.txt b/test/fixtures/javascript/corpus/anonymous-function.parseB.txt index 34c5cb21e..f5356effb 100644 --- a/test/fixtures/javascript/corpus/anonymous-function.parseB.txt +++ b/test/fixtures/javascript/corpus/anonymous-function.parseB.txt @@ -1,20 +1,20 @@ -(Statements - (Function - (Empty) - (Empty) - (Empty) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Return - (Times - (Identifier) - (Identifier)))))) +(Program + (Statement + (ExpressionStatement + (Expression + (Function + (StatementBlock + (Statement + (ReturnStatement + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "b")) + (Expression + (Identifier "c"))))))) + (FormalParameters + (RequiredParameter + (Identifier "b")) + (RequiredParameter + (Identifier "c")))))))) diff --git a/test/fixtures/javascript/corpus/anonymous-parameterless-function.parseA.txt b/test/fixtures/javascript/corpus/anonymous-parameterless-function.parseA.txt index 7b029338c..c0b50535f 100644 --- a/test/fixtures/javascript/corpus/anonymous-parameterless-function.parseA.txt +++ b/test/fixtures/javascript/corpus/anonymous-parameterless-function.parseA.txt @@ -1,8 +1,11 @@ -(Statements - (Function - (Empty) - (Empty) - (Empty) - (StatementBlock - (Return - (TextElement))))) +(Program + (Statement + (ExpressionStatement + (Expression + (Function + (StatementBlock + (Statement + (ReturnStatement + (Expression + (String))))) + (FormalParameters)))))) diff --git a/test/fixtures/javascript/corpus/anonymous-parameterless-function.parseB.txt b/test/fixtures/javascript/corpus/anonymous-parameterless-function.parseB.txt index 7b029338c..c0b50535f 100644 --- a/test/fixtures/javascript/corpus/anonymous-parameterless-function.parseB.txt +++ b/test/fixtures/javascript/corpus/anonymous-parameterless-function.parseB.txt @@ -1,8 +1,11 @@ -(Statements - (Function - (Empty) - (Empty) - (Empty) - (StatementBlock - (Return - (TextElement))))) +(Program + (Statement + (ExpressionStatement + (Expression + (Function + (StatementBlock + (Statement + (ReturnStatement + (Expression + (String))))) + (FormalParameters)))))) diff --git a/test/fixtures/javascript/corpus/array.parseA.txt b/test/fixtures/javascript/corpus/array.parseA.txt index d5891f355..51199093a 100644 --- a/test/fixtures/javascript/corpus/array.parseA.txt +++ b/test/fixtures/javascript/corpus/array.parseA.txt @@ -1,3 +1,7 @@ -(Statements - (Array - (TextElement))) +(Program + (Statement + (ExpressionStatement + (Expression + (Array + (Expression + (String))))))) diff --git a/test/fixtures/javascript/corpus/array.parseB.txt b/test/fixtures/javascript/corpus/array.parseB.txt index 4de5832a5..985c789dd 100644 --- a/test/fixtures/javascript/corpus/array.parseB.txt +++ b/test/fixtures/javascript/corpus/array.parseB.txt @@ -1,4 +1,9 @@ -(Statements - (Array - (TextElement) - (TextElement))) +(Program + (Statement + (ExpressionStatement + (Expression + (Array + (Expression + (String)) + (Expression + (String))))))) diff --git a/test/fixtures/javascript/corpus/arrow-function.parseA.txt b/test/fixtures/javascript/corpus/arrow-function.parseA.txt index b232ac3bd..ed34ac268 100644 --- a/test/fixtures/javascript/corpus/arrow-function.parseA.txt +++ b/test/fixtures/javascript/corpus/arrow-function.parseA.txt @@ -1,18 +1,15 @@ -(Statements - (Function - (Empty) - (Empty) - (Empty) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Return - (Identifier))))) +(Program + (Statement + (ExpressionStatement + (Expression + (ArrowFunction + (StatementBlock + (Statement + (ReturnStatement + (Expression + (Identifier "h"))))) + (FormalParameters + (RequiredParameter + (Identifier "f")) + (RequiredParameter + (Identifier "g")))))))) diff --git a/test/fixtures/javascript/corpus/arrow-function.parseB.txt b/test/fixtures/javascript/corpus/arrow-function.parseB.txt index b232ac3bd..67efe73fd 100644 --- a/test/fixtures/javascript/corpus/arrow-function.parseB.txt +++ b/test/fixtures/javascript/corpus/arrow-function.parseB.txt @@ -1,18 +1,15 @@ -(Statements - (Function - (Empty) - (Empty) - (Empty) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Return - (Identifier))))) +(Program + (Statement + (ExpressionStatement + (Expression + (ArrowFunction + (StatementBlock + (Statement + (ReturnStatement + (Expression + (Identifier "g"))))) + (FormalParameters + (RequiredParameter + (Identifier "f")) + (RequiredParameter + (Identifier "g")))))))) diff --git a/test/fixtures/javascript/corpus/assignment-pattern.parseA.txt b/test/fixtures/javascript/corpus/assignment-pattern.parseA.txt index 2db3947ee..d31efb2e7 100644 --- a/test/fixtures/javascript/corpus/assignment-pattern.parseA.txt +++ b/test/fixtures/javascript/corpus/assignment-pattern.parseA.txt @@ -1,9 +1,13 @@ -(Statements - (VariableDeclaration - (Assignment - (Empty) - (Hash - (Assignment - (ShorthandPropertyIdentifier) - (Float))) - (Identifier)))) +(Program + (Statement + (Declaration + (VariableDeclaration + (VariableDeclarator + (Expression + (Identifier "foo")) + (DestructuringPattern + (ObjectPattern + (AssignmentPattern + (ShorthandPropertyIdentifier "x") + (Expression + (Number "0")))))))))) diff --git a/test/fixtures/javascript/corpus/assignment-pattern.parseB.txt b/test/fixtures/javascript/corpus/assignment-pattern.parseB.txt index 2db3947ee..1fc700354 100644 --- a/test/fixtures/javascript/corpus/assignment-pattern.parseB.txt +++ b/test/fixtures/javascript/corpus/assignment-pattern.parseB.txt @@ -1,9 +1,13 @@ -(Statements - (VariableDeclaration - (Assignment - (Empty) - (Hash - (Assignment - (ShorthandPropertyIdentifier) - (Float))) - (Identifier)))) +(Program + (Statement + (Declaration + (VariableDeclaration + (VariableDeclarator + (Expression + (Identifier "foo")) + (DestructuringPattern + (ObjectPattern + (AssignmentPattern + (ShorthandPropertyIdentifier "y") + (Expression + (Number "1")))))))))) diff --git a/test/fixtures/javascript/corpus/assignment.parseA.txt b/test/fixtures/javascript/corpus/assignment.parseA.txt index e68803f14..a076e47c3 100644 --- a/test/fixtures/javascript/corpus/assignment.parseA.txt +++ b/test/fixtures/javascript/corpus/assignment.parseA.txt @@ -1,4 +1,8 @@ -(Statements - (Assignment - (Identifier) - (Float))) +(Program + (Statement + (ExpressionStatement + (Expression + (AssignmentExpression + (Identifier "x") + (Expression + (Number "0"))))))) diff --git a/test/fixtures/javascript/corpus/assignment.parseB.txt b/test/fixtures/javascript/corpus/assignment.parseB.txt index e68803f14..5b6c6262c 100644 --- a/test/fixtures/javascript/corpus/assignment.parseB.txt +++ b/test/fixtures/javascript/corpus/assignment.parseB.txt @@ -1,4 +1,8 @@ -(Statements - (Assignment - (Identifier) - (Float))) +(Program + (Statement + (ExpressionStatement + (Expression + (AssignmentExpression + (Identifier "x") + (Expression + (Number "1"))))))) diff --git a/test/fixtures/javascript/corpus/bitwise-operator.parseA.txt b/test/fixtures/javascript/corpus/bitwise-operator.parseA.txt index 3be6465cf..6a1cc6460 100644 --- a/test/fixtures/javascript/corpus/bitwise-operator.parseA.txt +++ b/test/fixtures/javascript/corpus/bitwise-operator.parseA.txt @@ -1,4 +1,10 @@ -(Statements - (RShift - (Identifier) - (Identifier))) +(Program + (Statement + (ExpressionStatement + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "i")) + (Expression + (Identifier "j"))))))) diff --git a/test/fixtures/javascript/corpus/bitwise-operator.parseB.txt b/test/fixtures/javascript/corpus/bitwise-operator.parseB.txt index 3be6465cf..032d59b53 100644 --- a/test/fixtures/javascript/corpus/bitwise-operator.parseB.txt +++ b/test/fixtures/javascript/corpus/bitwise-operator.parseB.txt @@ -1,4 +1,10 @@ -(Statements - (RShift - (Identifier) - (Identifier))) +(Program + (Statement + (ExpressionStatement + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "i")) + (Expression + (Identifier "k"))))))) diff --git a/test/fixtures/javascript/corpus/boolean-operator.parseA.txt b/test/fixtures/javascript/corpus/boolean-operator.parseA.txt index 90cabac73..6a1cc6460 100644 --- a/test/fixtures/javascript/corpus/boolean-operator.parseA.txt +++ b/test/fixtures/javascript/corpus/boolean-operator.parseA.txt @@ -1,4 +1,10 @@ -(Statements - (Or - (Identifier) - (Identifier))) +(Program + (Statement + (ExpressionStatement + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "i")) + (Expression + (Identifier "j"))))))) diff --git a/test/fixtures/javascript/corpus/boolean-operator.parseB.txt b/test/fixtures/javascript/corpus/boolean-operator.parseB.txt index 8fa994bf7..6a1cc6460 100644 --- a/test/fixtures/javascript/corpus/boolean-operator.parseB.txt +++ b/test/fixtures/javascript/corpus/boolean-operator.parseB.txt @@ -1,4 +1,10 @@ -(Statements - (And - (Identifier) - (Identifier))) +(Program + (Statement + (ExpressionStatement + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "i")) + (Expression + (Identifier "j"))))))) diff --git a/test/fixtures/javascript/corpus/break.parseA.txt b/test/fixtures/javascript/corpus/break.parseA.txt index 7e374ef00..3be6cbb92 100644 --- a/test/fixtures/javascript/corpus/break.parseA.txt +++ b/test/fixtures/javascript/corpus/break.parseA.txt @@ -1,21 +1,44 @@ -(Statements - (For - (Assignment - (Identifier) - (Float)) - (LessThan - (Identifier) - (Float)) - (Update - (Identifier)) - (Statements - (If - (StrictEqual - (Identifier) - (Float)) - (Statements - (Break - (Empty))) - (Empty)) - (Empty) - (Identifier)))) +(Program + (Statement + (ForStatement + (Statement + (StatementBlock + (Statement + (IfStatement + (Statement + (StatementBlock + (Statement + (BreakStatement)))) + (ParenthesizedExpression + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "i")) + (Expression + (Number "4"))))))) + (Statement + (EmptyStatement ";")) + (Statement + (ExpressionStatement + (Expression + (Identifier "i")))))) + (ExpressionStatement + (Expression + (AssignmentExpression + (Identifier "i") + (Expression + (Number "0"))))) + (ExpressionStatement + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "i")) + (Expression + (Number "10"))))) + (Expression + (UpdateExpression + (Token) + (Expression + (Identifier "i"))))))) diff --git a/test/fixtures/javascript/corpus/break.parseB.txt b/test/fixtures/javascript/corpus/break.parseB.txt index 33b8ce898..a835ae53a 100644 --- a/test/fixtures/javascript/corpus/break.parseB.txt +++ b/test/fixtures/javascript/corpus/break.parseB.txt @@ -1,21 +1,44 @@ -(Statements - (For - (Assignment - (Identifier) - (Float)) - (LessThan - (Identifier) - (Float)) - (Update - (Identifier)) - (Statements - (If - (StrictEqual - (Identifier) - (Float)) - (Statements - (Continue - (Empty))) - (Empty)) - (Empty) - (Identifier)))) +(Program + (Statement + (ForStatement + (Statement + (StatementBlock + (Statement + (IfStatement + (Statement + (StatementBlock + (Statement + (ContinueStatement)))) + (ParenthesizedExpression + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "i")) + (Expression + (Number "4"))))))) + (Statement + (EmptyStatement ";")) + (Statement + (ExpressionStatement + (Expression + (Identifier "i")))))) + (ExpressionStatement + (Expression + (AssignmentExpression + (Identifier "i") + (Expression + (Number "0"))))) + (ExpressionStatement + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "i")) + (Expression + (Number "10"))))) + (Expression + (UpdateExpression + (Token) + (Expression + (Identifier "i"))))))) diff --git a/test/fixtures/javascript/corpus/chained-callbacks.parseA.txt b/test/fixtures/javascript/corpus/chained-callbacks.parseA.txt index 0b0623d66..5ff0a3f71 100644 --- a/test/fixtures/javascript/corpus/chained-callbacks.parseA.txt +++ b/test/fixtures/javascript/corpus/chained-callbacks.parseA.txt @@ -1,20 +1,24 @@ -(Statements - (Call - (MemberAccess - (This) - (Identifier)) - (Function - (Empty) - (Empty) - (Empty) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Return - (MemberAccess - (Identifier) - (Identifier))))) - (Empty))) +(Program + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (MemberExpression + (PropertyIdentifier "map") + (Expression + (This "this")))) + (Arguments + (Expression + (Function + (StatementBlock + (Statement + (ReturnStatement + (Expression + (MemberExpression + (PropertyIdentifier "b") + (Expression + (Identifier "a"))))))) + (FormalParameters + (RequiredParameter + (Identifier "a"))))))))))) diff --git a/test/fixtures/javascript/corpus/chained-callbacks.parseB.txt b/test/fixtures/javascript/corpus/chained-callbacks.parseB.txt index 0b0623d66..66b9e870e 100644 --- a/test/fixtures/javascript/corpus/chained-callbacks.parseB.txt +++ b/test/fixtures/javascript/corpus/chained-callbacks.parseB.txt @@ -1,20 +1,24 @@ -(Statements - (Call - (MemberAccess - (This) - (Identifier)) - (Function - (Empty) - (Empty) - (Empty) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Return - (MemberAccess - (Identifier) - (Identifier))))) - (Empty))) +(Program + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (MemberExpression + (PropertyIdentifier "reduce") + (Expression + (This "this")))) + (Arguments + (Expression + (Function + (StatementBlock + (Statement + (ReturnStatement + (Expression + (MemberExpression + (PropertyIdentifier "a") + (Expression + (Identifier "b"))))))) + (FormalParameters + (RequiredParameter + (Identifier "a"))))))))))) diff --git a/test/fixtures/javascript/corpus/chained-property-access.parseA.txt b/test/fixtures/javascript/corpus/chained-property-access.parseA.txt index 52d369111..99a5346ed 100644 --- a/test/fixtures/javascript/corpus/chained-property-access.parseA.txt +++ b/test/fixtures/javascript/corpus/chained-property-access.parseA.txt @@ -1,21 +1,33 @@ -(Statements - (Return - (Call - (MemberAccess - (Call - (MemberAccess - (Call - (MemberAccess - (Identifier) - (Identifier)) - (Empty)) - (Identifier)) - (MemberAccess - (Identifier) - (Identifier)) - (Empty)) - (Identifier)) - (MemberAccess - (Identifier) - (Identifier)) - (Empty)))) +(Program + (Statement + (ReturnStatement + (Expression + (CallExpression + (Expression + (MemberExpression + (PropertyIdentifier "fail") + (Expression + (CallExpression + (Expression + (MemberExpression + (PropertyIdentifier "done") + (Expression + (CallExpression + (Expression + (MemberExpression + (PropertyIdentifier "promise") + (Expression + (Identifier "returned")))) + (Arguments))))) + (Arguments + (Expression + (MemberExpression + (PropertyIdentifier "resolve") + (Expression + (Identifier "newDefer"))))))))) + (Arguments + (Expression + (MemberExpression + (PropertyIdentifier "reject") + (Expression + (Identifier "newDefer")))))))))) diff --git a/test/fixtures/javascript/corpus/chained-property-access.parseB.txt b/test/fixtures/javascript/corpus/chained-property-access.parseB.txt index 52d369111..43bca6539 100644 --- a/test/fixtures/javascript/corpus/chained-property-access.parseB.txt +++ b/test/fixtures/javascript/corpus/chained-property-access.parseB.txt @@ -1,21 +1,33 @@ -(Statements - (Return - (Call - (MemberAccess - (Call - (MemberAccess - (Call - (MemberAccess - (Identifier) - (Identifier)) - (Empty)) - (Identifier)) - (MemberAccess - (Identifier) - (Identifier)) - (Empty)) - (Identifier)) - (MemberAccess - (Identifier) - (Identifier)) - (Empty)))) +(Program + (Statement + (ReturnStatement + (Expression + (CallExpression + (Expression + (MemberExpression + (PropertyIdentifier "fail") + (Expression + (CallExpression + (Expression + (MemberExpression + (PropertyIdentifier "done") + (Expression + (CallExpression + (Expression + (MemberExpression + (PropertyIdentifier "promise") + (Expression + (Identifier "returned")))) + (Arguments))))) + (Arguments + (Expression + (MemberExpression + (PropertyIdentifier "resolve") + (Expression + (Identifier "otherDefer"))))))))) + (Arguments + (Expression + (MemberExpression + (PropertyIdentifier "reject") + (Expression + (Identifier "otherDefer")))))))))) diff --git a/test/fixtures/javascript/corpus/class.parseA.txt b/test/fixtures/javascript/corpus/class.parseA.txt index cb71079ce..b82b6a11d 100644 --- a/test/fixtures/javascript/corpus/class.parseA.txt +++ b/test/fixtures/javascript/corpus/class.parseA.txt @@ -1,51 +1,40 @@ -(Statements - (Class - (TypeIdentifier) - (Statements - (PublicFieldDefinition - (Empty) - (Empty) - (Identifier) - (Float)) - (Method - (Empty) - (Empty) - (Empty) - (Empty) - (Identifier) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Return - (Identifier)))) - (Method - (Empty) - (Empty) - (Empty) - (Empty) - (Identifier) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Return - (Identifier)))) - (Method - (Empty) - (Empty) - (Empty) - (Empty) - (Identifier) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Return - (Identifier))))))) +(Program + (Statement + (Declaration + (ClassDeclaration + (ClassBody + (PublicFieldDefinition + (Expression + (Number "5")) + (PropertyIdentifier "bar")) + (MethodDefinition + (StatementBlock + (Statement + (ReturnStatement + (Expression + (Identifier "a"))))) + (PropertyIdentifier "one") + (FormalParameters + (RequiredParameter + (Identifier "a")))) + (MethodDefinition + (StatementBlock + (Statement + (ReturnStatement + (Expression + (Identifier "b"))))) + (PropertyIdentifier "two") + (FormalParameters + (RequiredParameter + (Identifier "b")))) + (MethodDefinition + (StatementBlock + (Statement + (ReturnStatement + (Expression + (Identifier "c"))))) + (PropertyIdentifier "three") + (FormalParameters + (RequiredParameter + (Identifier "c"))))) + (TypeIdentifier "Foo"))))) diff --git a/test/fixtures/javascript/corpus/class.parseB.txt b/test/fixtures/javascript/corpus/class.parseB.txt index a47080a26..38351e28d 100644 --- a/test/fixtures/javascript/corpus/class.parseB.txt +++ b/test/fixtures/javascript/corpus/class.parseB.txt @@ -1,46 +1,36 @@ -(Statements - (Class - (TypeIdentifier) - (Statements - (Method - (Empty) - (Empty) - (Empty) - (Empty) - (Identifier) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Return - (Identifier)))) - (Method - (Empty) - (Empty) - (Empty) - (Empty) - (Identifier) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Return - (Identifier)))) - (Method - (Empty) - (Empty) - (Empty) - (Empty) - (Identifier) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Return - (Identifier))))))) +(Program + (Statement + (Declaration + (ClassDeclaration + (ClassBody + (MethodDefinition + (StatementBlock + (Statement + (ReturnStatement + (Expression + (Identifier "a"))))) + (PropertyIdentifier "foo") + (FormalParameters + (RequiredParameter + (Identifier "a")))) + (MethodDefinition + (StatementBlock + (Statement + (ReturnStatement + (Expression + (Identifier "b"))))) + (PropertyIdentifier "bar") + (FormalParameters + (RequiredParameter + (Identifier "b")))) + (MethodDefinition + (StatementBlock + (Statement + (ReturnStatement + (Expression + (Identifier "c"))))) + (PropertyIdentifier "baz") + (FormalParameters + (RequiredParameter + (Identifier "c"))))) + (TypeIdentifier "Foo"))))) diff --git a/test/fixtures/javascript/corpus/comma-operator.parseA.txt b/test/fixtures/javascript/corpus/comma-operator.parseA.txt index 06fbde18f..960b93c67 100644 --- a/test/fixtures/javascript/corpus/comma-operator.parseA.txt +++ b/test/fixtures/javascript/corpus/comma-operator.parseA.txt @@ -1,8 +1,14 @@ -(Statements - (SequenceExpression - (Assignment - (Identifier) - (Float)) - (Assignment - (Identifier) - (Float)))) +(Program + (Statement + (ExpressionStatement + (SequenceExpression + (Expression + (AssignmentExpression + (Identifier "a") + (Expression + (Number "1")))) + (Expression + (AssignmentExpression + (Identifier "b") + (Expression + (Number "2")))))))) diff --git a/test/fixtures/javascript/corpus/comma-operator.parseB.txt b/test/fixtures/javascript/corpus/comma-operator.parseB.txt index acf60ac42..e1ead0770 100644 --- a/test/fixtures/javascript/corpus/comma-operator.parseB.txt +++ b/test/fixtures/javascript/corpus/comma-operator.parseB.txt @@ -1,13 +1,25 @@ -(Statements - (Assignment - (Identifier) - (Hash - (KeyValue - (Identifier) - (SequenceExpression - (Float) - (SequenceExpression - (Plus - (Float) - (Float)) - (Float))))))) +(Program + (Statement + (ExpressionStatement + (Expression + (AssignmentExpression + (Identifier "c") + (Expression + (Object + (Pair + (Expression + (ParenthesizedExpression + (SequenceExpression + (Expression + (Number "3")) + (SequenceExpression + (Expression + (BinaryExpression + (Token) + (Expression + (Number "4")) + (Expression + (Number "5")))) + (Expression + (Number "6")))))) + (PropertyIdentifier "d"))))))))) diff --git a/test/fixtures/javascript/corpus/comment.parseA.txt b/test/fixtures/javascript/corpus/comment.parseA.txt index 4568b6b78..0b05546cd 100644 --- a/test/fixtures/javascript/corpus/comment.parseA.txt +++ b/test/fixtures/javascript/corpus/comment.parseA.txt @@ -1,4 +1 @@ -(Statements - (Context - (Comment) - (Empty))) +(Program) diff --git a/test/fixtures/javascript/corpus/comment.parseB.txt b/test/fixtures/javascript/corpus/comment.parseB.txt index 4568b6b78..0b05546cd 100644 --- a/test/fixtures/javascript/corpus/comment.parseB.txt +++ b/test/fixtures/javascript/corpus/comment.parseB.txt @@ -1,4 +1 @@ -(Statements - (Context - (Comment) - (Empty))) +(Program) diff --git a/test/fixtures/javascript/corpus/constructor-call.parseA.txt b/test/fixtures/javascript/corpus/constructor-call.parseA.txt index 64b4f69b7..3f61ff455 100644 --- a/test/fixtures/javascript/corpus/constructor-call.parseA.txt +++ b/test/fixtures/javascript/corpus/constructor-call.parseA.txt @@ -1,8 +1,14 @@ -(Statements - (New - (MemberAccess - (Identifier) - (Identifier)) - (Empty) - (Float) - (TextElement))) +(Program + (Statement + (ExpressionStatement + (Expression + (NewExpression + (Arguments + (Expression + (Number "1")) + (Expression + (String))) + (MemberExpression + (PropertyIdentifier "Klass") + (Expression + (Identifier "module")))))))) diff --git a/test/fixtures/javascript/corpus/constructor-call.parseB.txt b/test/fixtures/javascript/corpus/constructor-call.parseB.txt index 64b4f69b7..3f61ff455 100644 --- a/test/fixtures/javascript/corpus/constructor-call.parseB.txt +++ b/test/fixtures/javascript/corpus/constructor-call.parseB.txt @@ -1,8 +1,14 @@ -(Statements - (New - (MemberAccess - (Identifier) - (Identifier)) - (Empty) - (Float) - (TextElement))) +(Program + (Statement + (ExpressionStatement + (Expression + (NewExpression + (Arguments + (Expression + (Number "1")) + (Expression + (String))) + (MemberExpression + (PropertyIdentifier "Klass") + (Expression + (Identifier "module")))))))) diff --git a/test/fixtures/javascript/corpus/continue.parseA.txt b/test/fixtures/javascript/corpus/continue.parseA.txt index 33b8ce898..a835ae53a 100644 --- a/test/fixtures/javascript/corpus/continue.parseA.txt +++ b/test/fixtures/javascript/corpus/continue.parseA.txt @@ -1,21 +1,44 @@ -(Statements - (For - (Assignment - (Identifier) - (Float)) - (LessThan - (Identifier) - (Float)) - (Update - (Identifier)) - (Statements - (If - (StrictEqual - (Identifier) - (Float)) - (Statements - (Continue - (Empty))) - (Empty)) - (Empty) - (Identifier)))) +(Program + (Statement + (ForStatement + (Statement + (StatementBlock + (Statement + (IfStatement + (Statement + (StatementBlock + (Statement + (ContinueStatement)))) + (ParenthesizedExpression + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "i")) + (Expression + (Number "4"))))))) + (Statement + (EmptyStatement ";")) + (Statement + (ExpressionStatement + (Expression + (Identifier "i")))))) + (ExpressionStatement + (Expression + (AssignmentExpression + (Identifier "i") + (Expression + (Number "0"))))) + (ExpressionStatement + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "i")) + (Expression + (Number "10"))))) + (Expression + (UpdateExpression + (Token) + (Expression + (Identifier "i"))))))) diff --git a/test/fixtures/javascript/corpus/continue.parseB.txt b/test/fixtures/javascript/corpus/continue.parseB.txt index 7e374ef00..3be6cbb92 100644 --- a/test/fixtures/javascript/corpus/continue.parseB.txt +++ b/test/fixtures/javascript/corpus/continue.parseB.txt @@ -1,21 +1,44 @@ -(Statements - (For - (Assignment - (Identifier) - (Float)) - (LessThan - (Identifier) - (Float)) - (Update - (Identifier)) - (Statements - (If - (StrictEqual - (Identifier) - (Float)) - (Statements - (Break - (Empty))) - (Empty)) - (Empty) - (Identifier)))) +(Program + (Statement + (ForStatement + (Statement + (StatementBlock + (Statement + (IfStatement + (Statement + (StatementBlock + (Statement + (BreakStatement)))) + (ParenthesizedExpression + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "i")) + (Expression + (Number "4"))))))) + (Statement + (EmptyStatement ";")) + (Statement + (ExpressionStatement + (Expression + (Identifier "i")))))) + (ExpressionStatement + (Expression + (AssignmentExpression + (Identifier "i") + (Expression + (Number "0"))))) + (ExpressionStatement + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "i")) + (Expression + (Number "10"))))) + (Expression + (UpdateExpression + (Token) + (Expression + (Identifier "i"))))))) diff --git a/test/fixtures/javascript/corpus/delete-operator.parseA.txt b/test/fixtures/javascript/corpus/delete-operator.parseA.txt index 1f1a1d58f..688cf8e68 100644 --- a/test/fixtures/javascript/corpus/delete-operator.parseA.txt +++ b/test/fixtures/javascript/corpus/delete-operator.parseA.txt @@ -1,5 +1,12 @@ -(Statements - (Delete - (Subscript - (Identifier) - (TextElement)))) +(Program + (Statement + (ExpressionStatement + (Expression + (UnaryExpression + (Token) + (Expression + (SubscriptExpression + (Expression + (Identifier "thing")) + (Expression + (String))))))))) diff --git a/test/fixtures/javascript/corpus/delete-operator.parseB.txt b/test/fixtures/javascript/corpus/delete-operator.parseB.txt index 310b7babe..88ee6a2c3 100644 --- a/test/fixtures/javascript/corpus/delete-operator.parseB.txt +++ b/test/fixtures/javascript/corpus/delete-operator.parseB.txt @@ -1,5 +1,11 @@ -(Statements - (Delete - (MemberAccess - (Identifier) - (Identifier)))) +(Program + (Statement + (ExpressionStatement + (Expression + (UnaryExpression + (Token) + (Expression + (MemberExpression + (PropertyIdentifier "prop") + (Expression + (Identifier "thing"))))))))) diff --git a/test/fixtures/javascript/corpus/do-while-statement.parseA.txt b/test/fixtures/javascript/corpus/do-while-statement.parseA.txt index d518e0b65..7923b18cb 100644 --- a/test/fixtures/javascript/corpus/do-while-statement.parseA.txt +++ b/test/fixtures/javascript/corpus/do-while-statement.parseA.txt @@ -1,10 +1,20 @@ -(Statements - (DoWhile - (Boolean) - (Statements - (Call - (MemberAccess - (Identifier) - (Identifier)) - (Identifier) - (Empty))))) +(Program + (Statement + (DoStatement + (Statement + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (MemberExpression + (PropertyIdentifier "log") + (Expression + (Identifier "console")))) + (Arguments + (Expression + (Identifier "insert"))))))))) + (ParenthesizedExpression + (Expression + (True "true")))))) diff --git a/test/fixtures/javascript/corpus/do-while-statement.parseB.txt b/test/fixtures/javascript/corpus/do-while-statement.parseB.txt index d518e0b65..22e1834e7 100644 --- a/test/fixtures/javascript/corpus/do-while-statement.parseB.txt +++ b/test/fixtures/javascript/corpus/do-while-statement.parseB.txt @@ -1,10 +1,20 @@ -(Statements - (DoWhile - (Boolean) - (Statements - (Call - (MemberAccess - (Identifier) - (Identifier)) - (Identifier) - (Empty))))) +(Program + (Statement + (DoStatement + (Statement + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (MemberExpression + (PropertyIdentifier "log") + (Expression + (Identifier "console")))) + (Arguments + (Expression + (Identifier "replacement"))))))))) + (ParenthesizedExpression + (Expression + (False "false")))))) diff --git a/test/fixtures/javascript/corpus/export.parseA.txt b/test/fixtures/javascript/corpus/export.parseA.txt index 2a01fba80..a1e5b0619 100644 --- a/test/fixtures/javascript/corpus/export.parseA.txt +++ b/test/fixtures/javascript/corpus/export.parseA.txt @@ -1,54 +1,97 @@ -(Statements - (QualifiedExport) - (QualifiedExport) - (DefaultExport - (VariableDeclaration - (Assignment - (Empty) - (Identifier) - (Empty)) - (Assignment - (Empty) - (Identifier) - (Empty)) - (Assignment - (Empty) - (Identifier) - (Empty)))) - (DefaultExport - (VariableDeclaration - (Assignment - (Empty) - (Identifier) - (Identifier)) - (Assignment - (Empty) - (Identifier) - (Identifier)) - (Assignment - (Empty) - (Identifier) - (Empty)) - (Assignment - (Empty) - (Identifier) - (Empty)))) - (DefaultExport - (Identifier)) - (DefaultExport - (Function - (Empty) - (Empty) - (Empty) - (StatementBlock))) - (DefaultExport - (Function - (Empty) - (Empty) - (Identifier) - (StatementBlock))) - (QualifiedExport) - (DefaultExport - (TextElement)) - (QualifiedExportFrom) - (QualifiedExportFrom)) +(Program + (Statement + (ExportStatement + (ExportClause + (ExportSpecifier + (Identifier "name1")) + (ExportSpecifier + (Identifier "name2")) + (ExportSpecifier + (Identifier "name3")) + (ExportSpecifier + (Identifier "nameN"))))) + (Statement + (ExportStatement + (ExportClause + (ExportSpecifier + (Identifier "name1") + (Identifier "variable1")) + (ExportSpecifier + (Identifier "name2") + (Identifier "variable2")) + (ExportSpecifier + (Identifier "nameN"))))) + (Statement + (ExportStatement + (Declaration + (LexicalDeclaration + (VariableDeclarator + (Identifier "name1")) + (VariableDeclarator + (Identifier "name2")) + (VariableDeclarator + (Identifier "nameN")))))) + (Statement + (ExportStatement + (Declaration + (LexicalDeclaration + (VariableDeclarator + (Expression + (Identifier "value1")) + (Identifier "name1")) + (VariableDeclarator + (Expression + (Identifier "value2")) + (Identifier "name2")) + (VariableDeclarator + (Identifier "name3")) + (VariableDeclarator + (Identifier "nameN")))))) + (Statement + (ExportStatement + (Expression + (Identifier "namedFunction")))) + (Statement + (ExportStatement + (Expression + (Function + (StatementBlock) + (FormalParameters))))) + (Statement + (ExportStatement + (Expression + (Function + (StatementBlock) + (Identifier "name1") + (FormalParameters))))) + (Statement + (ExportStatement + (ExportClause + (ExportSpecifier + (Identifier "default") + (Identifier "name1"))))) + (Statement + (ExportStatement + (String))) + (Statement + (ExportStatement + (String) + (ExportClause + (ExportSpecifier + (Identifier "name1")) + (ExportSpecifier + (Identifier "name2")) + (ExportSpecifier + (Identifier "nameN"))))) + (Statement + (ExportStatement + (String) + (ExportClause + (ExportSpecifier + (Identifier "name1") + (Identifier "import1")) + (ExportSpecifier + (Identifier "name2") + (Identifier "import2")) + (ExportSpecifier + (Identifier "nameN")))))) diff --git a/test/fixtures/javascript/corpus/export.parseB.txt b/test/fixtures/javascript/corpus/export.parseB.txt index a341a4f86..56e369e27 100644 --- a/test/fixtures/javascript/corpus/export.parseB.txt +++ b/test/fixtures/javascript/corpus/export.parseB.txt @@ -1,54 +1,97 @@ -(Statements - (QualifiedExport) - (QualifiedExport) - (DefaultExport - (VariableDeclaration - (Assignment - (Empty) - (Identifier) - (Empty)) - (Assignment - (Empty) - (Identifier) - (Empty)) - (Assignment - (Empty) - (Identifier) - (Empty)))) - (DefaultExport - (VariableDeclaration - (Assignment - (Empty) - (Identifier) - (Identifier)) - (Assignment - (Empty) - (Identifier) - (Identifier)) - (Assignment - (Empty) - (Identifier) - (Empty)) - (Assignment - (Empty) - (Identifier) - (Empty)))) - (DefaultExport - (Identifier)) - (DefaultExport - (Function - (Empty) - (Empty) - (Identifier) - (StatementBlock))) - (DefaultExport - (Function - (Empty) - (Empty) - (Empty) - (StatementBlock))) - (QualifiedExport) - (DefaultExport - (TextElement)) - (QualifiedExportFrom) - (QualifiedExportFrom)) +(Program + (Statement + (ExportStatement + (ExportClause + (ExportSpecifier + (Identifier "name4")) + (ExportSpecifier + (Identifier "name5")) + (ExportSpecifier + (Identifier "name6")) + (ExportSpecifier + (Identifier "nameZ"))))) + (Statement + (ExportStatement + (ExportClause + (ExportSpecifier + (Identifier "name2") + (Identifier "variable2")) + (ExportSpecifier + (Identifier "name3") + (Identifier "variable3")) + (ExportSpecifier + (Identifier "nameY"))))) + (Statement + (ExportStatement + (Declaration + (LexicalDeclaration + (VariableDeclarator + (Identifier "name3")) + (VariableDeclarator + (Identifier "name4")) + (VariableDeclarator + (Identifier "nameT")))))) + (Statement + (ExportStatement + (Declaration + (LexicalDeclaration + (VariableDeclarator + (Expression + (Identifier "value2")) + (Identifier "name2")) + (VariableDeclarator + (Expression + (Identifier "value3")) + (Identifier "name3")) + (VariableDeclarator + (Identifier "name4")) + (VariableDeclarator + (Identifier "nameO")))))) + (Statement + (ExportStatement + (Expression + (Identifier "otherNamedFunction")))) + (Statement + (ExportStatement + (Expression + (Function + (StatementBlock) + (Identifier "newName1") + (FormalParameters))))) + (Statement + (ExportStatement + (Expression + (Function + (StatementBlock) + (FormalParameters))))) + (Statement + (ExportStatement + (ExportClause + (ExportSpecifier + (Identifier "statement") + (Identifier "name2"))))) + (Statement + (ExportStatement + (String))) + (Statement + (ExportStatement + (String) + (ExportClause + (ExportSpecifier + (Identifier "name7")) + (ExportSpecifier + (Identifier "name8")) + (ExportSpecifier + (Identifier "nameP"))))) + (Statement + (ExportStatement + (String) + (ExportClause + (ExportSpecifier + (Identifier "name6") + (Identifier "import6")) + (ExportSpecifier + (Identifier "name7") + (Identifier "import7")) + (ExportSpecifier + (Identifier "nameB")))))) diff --git a/test/fixtures/javascript/corpus/false.parseA.txt b/test/fixtures/javascript/corpus/false.parseA.txt index 25d98872e..3be6991ba 100644 --- a/test/fixtures/javascript/corpus/false.parseA.txt +++ b/test/fixtures/javascript/corpus/false.parseA.txt @@ -1,2 +1,5 @@ -(Statements - (Boolean)) +(Program + (Statement + (ExpressionStatement + (Expression + (False "false"))))) diff --git a/test/fixtures/javascript/corpus/false.parseB.txt b/test/fixtures/javascript/corpus/false.parseB.txt index 02e3c2a13..1123c876f 100644 --- a/test/fixtures/javascript/corpus/false.parseB.txt +++ b/test/fixtures/javascript/corpus/false.parseB.txt @@ -1,3 +1,5 @@ -(Statements - (Return - (Boolean))) +(Program + (Statement + (ReturnStatement + (Expression + (False "false"))))) diff --git a/test/fixtures/javascript/corpus/for-in-statement.parseA.txt b/test/fixtures/javascript/corpus/for-in-statement.parseA.txt index 6becb7a8d..ade0620a4 100644 --- a/test/fixtures/javascript/corpus/for-in-statement.parseA.txt +++ b/test/fixtures/javascript/corpus/for-in-statement.parseA.txt @@ -1,8 +1,15 @@ -(Statements - (ForEach - (Identifier) - (Identifier) - (Statements - (Call - (Identifier) - (Empty))))) +(Program + (Statement + (ForInStatement + (Statement + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (Identifier "thing")) + (Arguments))))))) + (Identifier "thing") + (Expression + (Identifier "things"))))) diff --git a/test/fixtures/javascript/corpus/for-in-statement.parseB.txt b/test/fixtures/javascript/corpus/for-in-statement.parseB.txt index 6becb7a8d..879fadc02 100644 --- a/test/fixtures/javascript/corpus/for-in-statement.parseB.txt +++ b/test/fixtures/javascript/corpus/for-in-statement.parseB.txt @@ -1,8 +1,15 @@ -(Statements - (ForEach - (Identifier) - (Identifier) - (Statements - (Call - (Identifier) - (Empty))))) +(Program + (Statement + (ForInStatement + (Statement + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (Identifier "item")) + (Arguments))))))) + (Identifier "item") + (Expression + (Identifier "items"))))) diff --git a/test/fixtures/javascript/corpus/for-loop-with-in-statement.parseA.txt b/test/fixtures/javascript/corpus/for-loop-with-in-statement.parseA.txt index a83600b05..1832273d2 100644 --- a/test/fixtures/javascript/corpus/for-loop-with-in-statement.parseA.txt +++ b/test/fixtures/javascript/corpus/for-loop-with-in-statement.parseA.txt @@ -1,18 +1,41 @@ -(Statements - (For - (And - (Member - (Identifier) - (Identifier)) - (Assignment - (Identifier) - (Float))) - (LessThan - (Identifier) - (Identifier)) - (Update - (Identifier)) - (Statements - (Call - (Identifier) - (Empty))))) +(Program + (Statement + (ForStatement + (Statement + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (Identifier "doSomething")) + (Arguments))))))) + (ExpressionStatement + (Expression + (BinaryExpression + (Token) + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "key")) + (Expression + (Identifier "something")))) + (Expression + (AssignmentExpression + (Identifier "i") + (Expression + (Number "0"))))))) + (ExpressionStatement + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "i")) + (Expression + (Identifier "n"))))) + (Expression + (UpdateExpression + (Token) + (Expression + (Identifier "i"))))))) diff --git a/test/fixtures/javascript/corpus/for-loop-with-in-statement.parseB.txt b/test/fixtures/javascript/corpus/for-loop-with-in-statement.parseB.txt index a83600b05..818f9c602 100644 --- a/test/fixtures/javascript/corpus/for-loop-with-in-statement.parseB.txt +++ b/test/fixtures/javascript/corpus/for-loop-with-in-statement.parseB.txt @@ -1,18 +1,41 @@ -(Statements - (For - (And - (Member - (Identifier) - (Identifier)) - (Assignment - (Identifier) - (Float))) - (LessThan - (Identifier) - (Identifier)) - (Update - (Identifier)) - (Statements - (Call - (Identifier) - (Empty))))) +(Program + (Statement + (ForStatement + (Statement + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (Identifier "doOtherSomething")) + (Arguments))))))) + (ExpressionStatement + (Expression + (BinaryExpression + (Token) + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "otherKey")) + (Expression + (Identifier "something")))) + (Expression + (AssignmentExpression + (Identifier "i") + (Expression + (Number "0"))))))) + (ExpressionStatement + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "i")) + (Expression + (Identifier "n"))))) + (Expression + (UpdateExpression + (Token) + (Expression + (Identifier "i"))))))) diff --git a/test/fixtures/javascript/corpus/for-of-statement.parseA.txt b/test/fixtures/javascript/corpus/for-of-statement.parseA.txt index fa4690da3..b45bbc851 100644 --- a/test/fixtures/javascript/corpus/for-of-statement.parseA.txt +++ b/test/fixtures/javascript/corpus/for-of-statement.parseA.txt @@ -1,10 +1,19 @@ -(Statements - (ForEach - (Identifier) - (Identifier) - (Statements - (Call - (Identifier) - (Identifier) - (Empty)))) - (Empty)) +(Program + (Statement + (ForInStatement + (Statement + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (Identifier "process")) + (Arguments + (Expression + (Identifier "item"))))))))) + (Identifier "item") + (Expression + (Identifier "items")))) + (Statement + (EmptyStatement ";"))) diff --git a/test/fixtures/javascript/corpus/for-of-statement.parseB.txt b/test/fixtures/javascript/corpus/for-of-statement.parseB.txt index fa4690da3..9bf63fefa 100644 --- a/test/fixtures/javascript/corpus/for-of-statement.parseB.txt +++ b/test/fixtures/javascript/corpus/for-of-statement.parseB.txt @@ -1,10 +1,19 @@ -(Statements - (ForEach - (Identifier) - (Identifier) - (Statements - (Call - (Identifier) - (Identifier) - (Empty)))) - (Empty)) +(Program + (Statement + (ForInStatement + (Statement + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (Identifier "process")) + (Arguments + (Expression + (Identifier "thing"))))))))) + (Identifier "thing") + (Expression + (Identifier "things")))) + (Statement + (EmptyStatement ";"))) diff --git a/test/fixtures/javascript/corpus/for-statement.parseA.txt b/test/fixtures/javascript/corpus/for-statement.parseA.txt index 883d1fd1a..241a178f4 100644 --- a/test/fixtures/javascript/corpus/for-statement.parseA.txt +++ b/test/fixtures/javascript/corpus/for-statement.parseA.txt @@ -1,19 +1,39 @@ -(Statements - (For - (SequenceExpression - (Assignment - (Identifier) - (Float)) - (Call - (Identifier) - (Empty))) - (LessThan - (Identifier) - (Float)) - (Update - (Identifier)) - (Statements - (Call - (Identifier) - (Identifier) - (Empty))))) +(Program + (Statement + (ForStatement + (Statement + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (Identifier "log")) + (Arguments + (Expression + (Identifier "i"))))))))) + (ExpressionStatement + (SequenceExpression + (Expression + (AssignmentExpression + (Identifier "i") + (Expression + (Number "0")))) + (Expression + (CallExpression + (Expression + (Identifier "init")) + (Arguments))))) + (ExpressionStatement + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "i")) + (Expression + (Number "10"))))) + (Expression + (UpdateExpression + (Token) + (Expression + (Identifier "i"))))))) diff --git a/test/fixtures/javascript/corpus/for-statement.parseB.txt b/test/fixtures/javascript/corpus/for-statement.parseB.txt index 883d1fd1a..432defeb1 100644 --- a/test/fixtures/javascript/corpus/for-statement.parseB.txt +++ b/test/fixtures/javascript/corpus/for-statement.parseB.txt @@ -1,19 +1,39 @@ -(Statements - (For - (SequenceExpression - (Assignment - (Identifier) - (Float)) - (Call - (Identifier) - (Empty))) - (LessThan - (Identifier) - (Float)) - (Update - (Identifier)) - (Statements - (Call - (Identifier) - (Identifier) - (Empty))))) +(Program + (Statement + (ForStatement + (Statement + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (Identifier "log")) + (Arguments + (Expression + (Identifier "i"))))))))) + (ExpressionStatement + (SequenceExpression + (Expression + (AssignmentExpression + (Identifier "i") + (Expression + (Number "0")))) + (Expression + (CallExpression + (Expression + (Identifier "init")) + (Arguments))))) + (ExpressionStatement + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "i")) + (Expression + (Number "100"))))) + (Expression + (UpdateExpression + (Token) + (Expression + (Identifier "i"))))))) diff --git a/test/fixtures/javascript/corpus/function-call-args.parseA.txt b/test/fixtures/javascript/corpus/function-call-args.parseA.txt index ed0a647fd..6bd83a38c 100644 --- a/test/fixtures/javascript/corpus/function-call-args.parseA.txt +++ b/test/fixtures/javascript/corpus/function-call-args.parseA.txt @@ -1,30 +1,38 @@ -(Statements - (Call - (Identifier) - (Float) - (TextElement) - (Function - (Empty) - (Empty) - (Empty) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Call - (MemberAccess - (Identifier) - (Identifier)) - (Identifier) - (Empty)) - (Return - (Identifier)))) - (Boolean) - (Empty))) +(Program + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (Identifier "someFunction")) + (Arguments + (Expression + (Number "1")) + (Expression + (String)) + (Expression + (Function + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (MemberExpression + (PropertyIdentifier "log") + (Expression + (Identifier "console")))) + (Arguments + (Expression + (Identifier "a"))))))) + (Statement + (ReturnStatement + (Expression + (Identifier "b"))))) + (FormalParameters + (RequiredParameter + (Identifier "a")) + (RequiredParameter + (Identifier "b"))))) + (Expression + (True "true")))))))) diff --git a/test/fixtures/javascript/corpus/function-call-args.parseB.txt b/test/fixtures/javascript/corpus/function-call-args.parseB.txt index ed0a647fd..19c869209 100644 --- a/test/fixtures/javascript/corpus/function-call-args.parseB.txt +++ b/test/fixtures/javascript/corpus/function-call-args.parseB.txt @@ -1,30 +1,38 @@ -(Statements - (Call - (Identifier) - (Float) - (TextElement) - (Function - (Empty) - (Empty) - (Empty) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Call - (MemberAccess - (Identifier) - (Identifier)) - (Identifier) - (Empty)) - (Return - (Identifier)))) - (Boolean) - (Empty))) +(Program + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (Identifier "someFunction")) + (Arguments + (Expression + (Number "1")) + (Expression + (String)) + (Expression + (Function + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (MemberExpression + (PropertyIdentifier "log") + (Expression + (Identifier "console")))) + (Arguments + (Expression + (Identifier "b"))))))) + (Statement + (ReturnStatement + (Expression + (Identifier "c"))))) + (FormalParameters + (RequiredParameter + (Identifier "b")) + (RequiredParameter + (Identifier "c"))))) + (Expression + (False "false")))))))) diff --git a/test/fixtures/javascript/corpus/function-call.parseA.txt b/test/fixtures/javascript/corpus/function-call.parseA.txt index 0a2778613..b8015e058 100644 --- a/test/fixtures/javascript/corpus/function-call.parseA.txt +++ b/test/fixtures/javascript/corpus/function-call.parseA.txt @@ -1,6 +1,12 @@ -(Statements - (Call - (Identifier) - (Identifier) - (TextElement) - (Empty))) +(Program + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (Identifier "someFunction")) + (Arguments + (Expression + (Identifier "arg1")) + (Expression + (String)))))))) diff --git a/test/fixtures/javascript/corpus/function-call.parseB.txt b/test/fixtures/javascript/corpus/function-call.parseB.txt index 0a2778613..b8015e058 100644 --- a/test/fixtures/javascript/corpus/function-call.parseB.txt +++ b/test/fixtures/javascript/corpus/function-call.parseB.txt @@ -1,6 +1,12 @@ -(Statements - (Call - (Identifier) - (Identifier) - (TextElement) - (Empty))) +(Program + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (Identifier "someFunction")) + (Arguments + (Expression + (Identifier "arg1")) + (Expression + (String)))))))) diff --git a/test/fixtures/javascript/corpus/function.parseA.txt b/test/fixtures/javascript/corpus/function.parseA.txt index d4d45c700..cf17a0e7a 100644 --- a/test/fixtures/javascript/corpus/function.parseA.txt +++ b/test/fixtures/javascript/corpus/function.parseA.txt @@ -1,17 +1,15 @@ -(Statements - (Function - (Empty) - (Empty) - (Empty) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Identifier)))) +(Program + (Statement + (ExpressionStatement + (Expression + (Function + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (Identifier "arg2"))))) + (FormalParameters + (RequiredParameter + (Identifier "arg1")) + (RequiredParameter + (Identifier "arg2")))))))) diff --git a/test/fixtures/javascript/corpus/function.parseB.txt b/test/fixtures/javascript/corpus/function.parseB.txt index d4d45c700..38ccaf492 100644 --- a/test/fixtures/javascript/corpus/function.parseB.txt +++ b/test/fixtures/javascript/corpus/function.parseB.txt @@ -1,17 +1,15 @@ -(Statements - (Function - (Empty) - (Empty) - (Empty) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Identifier)))) +(Program + (Statement + (ExpressionStatement + (Expression + (Function + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (Identifier "arg1"))))) + (FormalParameters + (RequiredParameter + (Identifier "arg1")) + (RequiredParameter + (Identifier "arg2")))))))) diff --git a/test/fixtures/javascript/corpus/generator-function.parseA.txt b/test/fixtures/javascript/corpus/generator-function.parseA.txt index 797e02cc5..141f4ed8b 100644 --- a/test/fixtures/javascript/corpus/generator-function.parseA.txt +++ b/test/fixtures/javascript/corpus/generator-function.parseA.txt @@ -1,21 +1,23 @@ -(Statements - (Function - (Empty) - (Empty) - (Identifier) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Yield - (Empty)) - (Yield - (Identifier)))) - (Empty)) +(Program + (Statement + (Declaration + (GeneratorFunctionDeclaration + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (YieldExpression)))) + (Statement + (ExpressionStatement + (Expression + (YieldExpression + (Expression + (Identifier "arg2"))))))) + (Identifier "generateStuff") + (FormalParameters + (RequiredParameter + (Identifier "arg1")) + (RequiredParameter + (Identifier "arg2")))))) + (Statement + (EmptyStatement ";"))) diff --git a/test/fixtures/javascript/corpus/generator-function.parseB.txt b/test/fixtures/javascript/corpus/generator-function.parseB.txt index 797e02cc5..c69d986e9 100644 --- a/test/fixtures/javascript/corpus/generator-function.parseB.txt +++ b/test/fixtures/javascript/corpus/generator-function.parseB.txt @@ -1,21 +1,23 @@ -(Statements - (Function - (Empty) - (Empty) - (Identifier) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Yield - (Empty)) - (Yield - (Identifier)))) - (Empty)) +(Program + (Statement + (Declaration + (GeneratorFunctionDeclaration + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (YieldExpression)))) + (Statement + (ExpressionStatement + (Expression + (YieldExpression + (Expression + (Identifier "arg2"))))))) + (Identifier "generateNewStuff") + (FormalParameters + (RequiredParameter + (Identifier "arg1")) + (RequiredParameter + (Identifier "arg2")))))) + (Statement + (EmptyStatement ";"))) diff --git a/test/fixtures/javascript/corpus/identifier.parseA.txt b/test/fixtures/javascript/corpus/identifier.parseA.txt index 5f0ab64c1..ee3655799 100644 --- a/test/fixtures/javascript/corpus/identifier.parseA.txt +++ b/test/fixtures/javascript/corpus/identifier.parseA.txt @@ -1,2 +1,5 @@ -(Statements - (Identifier)) +(Program + (Statement + (ExpressionStatement + (Expression + (Identifier "theVar"))))) diff --git a/test/fixtures/javascript/corpus/identifier.parseB.txt b/test/fixtures/javascript/corpus/identifier.parseB.txt index 5f0ab64c1..420643ed8 100644 --- a/test/fixtures/javascript/corpus/identifier.parseB.txt +++ b/test/fixtures/javascript/corpus/identifier.parseB.txt @@ -1,2 +1,5 @@ -(Statements - (Identifier)) +(Program + (Statement + (ExpressionStatement + (Expression + (Identifier "theVar2"))))) diff --git a/test/fixtures/javascript/corpus/if-else.parseA.txt b/test/fixtures/javascript/corpus/if-else.parseA.txt index 09d678134..d18a55158 100644 --- a/test/fixtures/javascript/corpus/if-else.parseA.txt +++ b/test/fixtures/javascript/corpus/if-else.parseA.txt @@ -1,14 +1,41 @@ -(Statements - (If - (Identifier) - (Identifier) - (If - (Identifier) - (Identifier) - (If - (Identifier) - (Identifier) - (If - (Identifier) - (Identifier) - (Identifier)))))) +(Program + (Statement + (IfStatement + (Statement + (IfStatement + (Statement + (IfStatement + (Statement + (IfStatement + (Statement + (ExpressionStatement + (Expression + (Identifier "g")))) + (Statement + (ExpressionStatement + (Expression + (Identifier "f")))) + (ParenthesizedExpression + (Expression + (Identifier "e"))))) + (Statement + (ExpressionStatement + (Expression + (Identifier "d")))) + (ParenthesizedExpression + (Expression + (Identifier "c"))))) + (Statement + (ExpressionStatement + (Expression + (Identifier "b")))) + (ParenthesizedExpression + (Expression + (Identifier "a"))))) + (Statement + (ExpressionStatement + (Expression + (Identifier "y")))) + (ParenthesizedExpression + (Expression + (Identifier "x")))))) diff --git a/test/fixtures/javascript/corpus/if-else.parseB.txt b/test/fixtures/javascript/corpus/if-else.parseB.txt index 49c8b8af1..181d88a29 100644 --- a/test/fixtures/javascript/corpus/if-else.parseB.txt +++ b/test/fixtures/javascript/corpus/if-else.parseB.txt @@ -1,16 +1,45 @@ -(Statements - (If - (Identifier) - (Identifier) - (If - (Identifier) - (Statements - (Identifier)) - (If - (Identifier) - (Identifier) - (If - (Identifier) - (Statements - (Identifier)) - (Identifier)))))) +(Program + (Statement + (IfStatement + (Statement + (IfStatement + (Statement + (IfStatement + (Statement + (IfStatement + (Statement + (ExpressionStatement + (Expression + (Identifier "o")))) + (Statement + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (Identifier "n")))))) + (ParenthesizedExpression + (Expression + (Identifier "m"))))) + (Statement + (ExpressionStatement + (Expression + (Identifier "l")))) + (ParenthesizedExpression + (Expression + (Identifier "k"))))) + (Statement + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (Identifier "j")))))) + (ParenthesizedExpression + (Expression + (Identifier "i"))))) + (Statement + (ExpressionStatement + (Expression + (Identifier "h")))) + (ParenthesizedExpression + (Expression + (Identifier "g")))))) diff --git a/test/fixtures/javascript/corpus/if.parseA.txt b/test/fixtures/javascript/corpus/if.parseA.txt index 63f3ac321..335293f9f 100644 --- a/test/fixtures/javascript/corpus/if.parseA.txt +++ b/test/fixtures/javascript/corpus/if.parseA.txt @@ -1,9 +1,17 @@ -(Statements - (If - (Identifier) - (Statements - (Call - (Identifier) - (Identifier) - (Empty))) - (Empty))) +(Program + (Statement + (IfStatement + (Statement + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (Identifier "log")) + (Arguments + (Expression + (Identifier "y"))))))))) + (ParenthesizedExpression + (Expression + (Identifier "x")))))) diff --git a/test/fixtures/javascript/corpus/if.parseB.txt b/test/fixtures/javascript/corpus/if.parseB.txt index 0b58858fd..8ad156560 100644 --- a/test/fixtures/javascript/corpus/if.parseB.txt +++ b/test/fixtures/javascript/corpus/if.parseB.txt @@ -1,12 +1,24 @@ -(Statements - (If - (MemberAccess - (Identifier) - (Identifier)) - (Statements - (Call - (Identifier) - (Identifier) - (Empty)) - (Identifier)) - (Empty))) +(Program + (Statement + (IfStatement + (Statement + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (Identifier "log")) + (Arguments + (Expression + (Identifier "c"))))))) + (Statement + (ExpressionStatement + (Expression + (Identifier "d")))))) + (ParenthesizedExpression + (Expression + (MemberExpression + (PropertyIdentifier "b") + (Expression + (Identifier "a")))))))) diff --git a/test/fixtures/javascript/corpus/import.parseA.txt b/test/fixtures/javascript/corpus/import.parseA.txt index 828eb6ea7..6a9fb8c0f 100644 --- a/test/fixtures/javascript/corpus/import.parseA.txt +++ b/test/fixtures/javascript/corpus/import.parseA.txt @@ -1,15 +1,59 @@ -(Statements - (Import) - (QualifiedAliasedImport - (Identifier)) - (Import) - (Import) - (Import) - (Statements - (Import) - (Import)) - (Statements - (Import) - (QualifiedAliasedImport - (Identifier))) - (SideEffectImport)) +(Program + (Statement + (ImportStatement + (String) + (ImportClause + (Identifier "defaultMember")))) + (Statement + (ImportStatement + (String) + (ImportClause + (NamespaceImport + (Identifier "name"))))) + (Statement + (ImportStatement + (String) + (ImportClause + (NamedImports + (ImportSpecifier + (Identifier "member")))))) + (Statement + (ImportStatement + (String) + (ImportClause + (NamedImports + (ImportSpecifier + (Identifier "member1")) + (ImportSpecifier + (Identifier "member2")))))) + (Statement + (ImportStatement + (String) + (ImportClause + (NamedImports + (ImportSpecifier + (Identifier "member1")) + (ImportSpecifier + (Identifier "alias2") + (Identifier "member2")))))) + (Statement + (ImportStatement + (String) + (ImportClause + (Identifier "defaultMember") + (NamedImports + (ImportSpecifier + (Identifier "member1")) + (ImportSpecifier + (Identifier "alias2") + (Identifier "member2")))))) + (Statement + (ImportStatement + (String) + (ImportClause + (Identifier "defaultMember") + (NamespaceImport + (Identifier "name"))))) + (Statement + (ImportStatement + (String)))) diff --git a/test/fixtures/javascript/corpus/import.parseB.txt b/test/fixtures/javascript/corpus/import.parseB.txt index 828eb6ea7..30fc0c7e3 100644 --- a/test/fixtures/javascript/corpus/import.parseB.txt +++ b/test/fixtures/javascript/corpus/import.parseB.txt @@ -1,15 +1,59 @@ -(Statements - (Import) - (QualifiedAliasedImport - (Identifier)) - (Import) - (Import) - (Import) - (Statements - (Import) - (Import)) - (Statements - (Import) - (QualifiedAliasedImport - (Identifier))) - (SideEffectImport)) +(Program + (Statement + (ImportStatement + (String) + (ImportClause + (Identifier "defaultMember")))) + (Statement + (ImportStatement + (String) + (ImportClause + (NamespaceImport + (Identifier "otherName"))))) + (Statement + (ImportStatement + (String) + (ImportClause + (NamedImports + (ImportSpecifier + (Identifier "element")))))) + (Statement + (ImportStatement + (String) + (ImportClause + (NamedImports + (ImportSpecifier + (Identifier "element1")) + (ImportSpecifier + (Identifier "element2")))))) + (Statement + (ImportStatement + (String) + (ImportClause + (NamedImports + (ImportSpecifier + (Identifier "element1")) + (ImportSpecifier + (Identifier "elementAlias2") + (Identifier "element2")))))) + (Statement + (ImportStatement + (String) + (ImportClause + (Identifier "defaultMember") + (NamedImports + (ImportSpecifier + (Identifier "element1")) + (ImportSpecifier + (Identifier "elementAlias2") + (Identifier "element2")))))) + (Statement + (ImportStatement + (String) + (ImportClause + (Identifier "defaultMember") + (NamespaceImport + (Identifier "element"))))) + (Statement + (ImportStatement + (String)))) diff --git a/test/fixtures/javascript/corpus/jsx.parseA.txt b/test/fixtures/javascript/corpus/jsx.parseA.txt index c42723ce3..fd3b751f0 100644 --- a/test/fixtures/javascript/corpus/jsx.parseA.txt +++ b/test/fixtures/javascript/corpus/jsx.parseA.txt @@ -1,22 +1,23 @@ -(Statements - (Function - (Empty) - (Empty) - (Identifier) - (StatementBlock - (Return - (JsxElement - (JsxOpeningElement - (Identifier) - (Empty)) - (JsxText) - (JsxElement - (JsxOpeningElement - (Identifier) - (Empty)) - (JsxText) - (JsxClosingElement - (Identifier))) - (JsxText) - (JsxClosingElement - (Identifier))))))) +(Program + (Statement + (Declaration + (FunctionDeclaration + (StatementBlock + (Statement + (ReturnStatement + (Expression + (JsxElement + (JsxClosingElement + (Identifier "div")) + (JsxOpeningElement + (Identifier "div")) + (JsxText "\n ") + (JsxElement + (JsxClosingElement + (Identifier "Foo")) + (JsxOpeningElement + (Identifier "Foo")) + (JsxText "hello")) + (JsxText "\n ")))))) + (Identifier "Something") + (FormalParameters))))) diff --git a/test/fixtures/javascript/corpus/jsx.parseB.txt b/test/fixtures/javascript/corpus/jsx.parseB.txt index 4916b0be6..d49bbdab8 100644 --- a/test/fixtures/javascript/corpus/jsx.parseB.txt +++ b/test/fixtures/javascript/corpus/jsx.parseB.txt @@ -1,23 +1,25 @@ -(Statements - (Function - (Empty) - (Empty) - (Identifier) - (StatementBlock - (Return - (JsxElement - (JsxOpeningElement - (Identifier) - (Empty)) - (JsxText) - (JsxElement - (JsxOpeningElement - (Identifier) - (TypeArguments - (TypeIdentifier))) - (JsxText) - (JsxClosingElement - (Identifier))) - (JsxText) - (JsxClosingElement - (Identifier))))))) +(Program + (Statement + (Declaration + (FunctionDeclaration + (StatementBlock + (Statement + (ReturnStatement + (Expression + (JsxElement + (JsxClosingElement + (Identifier "div")) + (JsxOpeningElement + (Identifier "div")) + (JsxText "\n ") + (JsxElement + (JsxClosingElement + (Identifier "Foo")) + (JsxOpeningElement + (Identifier "Foo") + (TypeArguments + (TypeIdentifier "T"))) + (JsxText "goodbye")) + (JsxText "\n ")))))) + (Identifier "Something") + (FormalParameters))))) diff --git a/test/fixtures/javascript/corpus/math-assignment-operator.parseA.txt b/test/fixtures/javascript/corpus/math-assignment-operator.parseA.txt index 5444f72e7..af0d3a863 100644 --- a/test/fixtures/javascript/corpus/math-assignment-operator.parseA.txt +++ b/test/fixtures/javascript/corpus/math-assignment-operator.parseA.txt @@ -1,5 +1,8 @@ -(Statements - (AugmentedAssignment - (Plus - (Identifier) - (Float)))) +(Program + (Statement + (ExpressionStatement + (Expression + (AugmentedAssignmentExpression + (Identifier "x") + (Expression + (Number "1"))))))) diff --git a/test/fixtures/javascript/corpus/math-assignment-operator.parseB.txt b/test/fixtures/javascript/corpus/math-assignment-operator.parseB.txt index 5444f72e7..b4837c673 100644 --- a/test/fixtures/javascript/corpus/math-assignment-operator.parseB.txt +++ b/test/fixtures/javascript/corpus/math-assignment-operator.parseB.txt @@ -1,5 +1,8 @@ -(Statements - (AugmentedAssignment - (Plus - (Identifier) - (Float)))) +(Program + (Statement + (ExpressionStatement + (Expression + (AugmentedAssignmentExpression + (Identifier "x") + (Expression + (Number "2"))))))) diff --git a/test/fixtures/javascript/corpus/math-operator.parseA.txt b/test/fixtures/javascript/corpus/math-operator.parseA.txt index 023fa5c6a..dd88c3c65 100644 --- a/test/fixtures/javascript/corpus/math-operator.parseA.txt +++ b/test/fixtures/javascript/corpus/math-operator.parseA.txt @@ -1,10 +1,25 @@ -(Statements - (Minus - (Plus - (Identifier) - (Times - (Identifier) - (Float))) - (Modulo - (Identifier) - (Float)))) +(Program + (Statement + (ExpressionStatement + (Expression + (BinaryExpression + (Token) + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "i")) + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "j")) + (Expression + (Number "3")))))) + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "j")) + (Expression + (Number "5"))))))))) diff --git a/test/fixtures/javascript/corpus/math-operator.parseB.txt b/test/fixtures/javascript/corpus/math-operator.parseB.txt index 023fa5c6a..62fb2bb75 100644 --- a/test/fixtures/javascript/corpus/math-operator.parseB.txt +++ b/test/fixtures/javascript/corpus/math-operator.parseB.txt @@ -1,10 +1,25 @@ -(Statements - (Minus - (Plus - (Identifier) - (Times - (Identifier) - (Float))) - (Modulo - (Identifier) - (Float)))) +(Program + (Statement + (ExpressionStatement + (Expression + (BinaryExpression + (Token) + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "i")) + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "j")) + (Expression + (Number "2")))))) + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "j")) + (Expression + (Number "4"))))))))) diff --git a/test/fixtures/javascript/corpus/member-access-assignment.parseA.txt b/test/fixtures/javascript/corpus/member-access-assignment.parseA.txt index a4d274369..cbd2b3285 100644 --- a/test/fixtures/javascript/corpus/member-access-assignment.parseA.txt +++ b/test/fixtures/javascript/corpus/member-access-assignment.parseA.txt @@ -1,6 +1,11 @@ -(Statements - (Assignment - (MemberAccess - (Identifier) - (Identifier)) - (Float))) +(Program + (Statement + (ExpressionStatement + (Expression + (AssignmentExpression + (MemberExpression + (PropertyIdentifier "x") + (Expression + (Identifier "y"))) + (Expression + (Number "0"))))))) diff --git a/test/fixtures/javascript/corpus/member-access-assignment.parseB.txt b/test/fixtures/javascript/corpus/member-access-assignment.parseB.txt index a4d274369..bdc68e3d2 100644 --- a/test/fixtures/javascript/corpus/member-access-assignment.parseB.txt +++ b/test/fixtures/javascript/corpus/member-access-assignment.parseB.txt @@ -1,6 +1,11 @@ -(Statements - (Assignment - (MemberAccess - (Identifier) - (Identifier)) - (Float))) +(Program + (Statement + (ExpressionStatement + (Expression + (AssignmentExpression + (MemberExpression + (PropertyIdentifier "x") + (Expression + (Identifier "y"))) + (Expression + (Number "1"))))))) diff --git a/test/fixtures/javascript/corpus/member-access.parseA.txt b/test/fixtures/javascript/corpus/member-access.parseA.txt index 70674960a..4561833d5 100644 --- a/test/fixtures/javascript/corpus/member-access.parseA.txt +++ b/test/fixtures/javascript/corpus/member-access.parseA.txt @@ -1,4 +1,8 @@ -(Statements - (MemberAccess - (Identifier) - (Identifier))) +(Program + (Statement + (ExpressionStatement + (Expression + (MemberExpression + (PropertyIdentifier "someProperty") + (Expression + (Identifier "x"))))))) diff --git a/test/fixtures/javascript/corpus/member-access.parseB.txt b/test/fixtures/javascript/corpus/member-access.parseB.txt index 70674960a..ad76fcda5 100644 --- a/test/fixtures/javascript/corpus/member-access.parseB.txt +++ b/test/fixtures/javascript/corpus/member-access.parseB.txt @@ -1,4 +1,8 @@ -(Statements - (MemberAccess - (Identifier) - (Identifier))) +(Program + (Statement + (ExpressionStatement + (Expression + (MemberExpression + (PropertyIdentifier "someOtherProperty") + (Expression + (Identifier "x"))))))) diff --git a/test/fixtures/javascript/corpus/method-call.parseA.txt b/test/fixtures/javascript/corpus/method-call.parseA.txt index 447b0ae78..87d432c28 100644 --- a/test/fixtures/javascript/corpus/method-call.parseA.txt +++ b/test/fixtures/javascript/corpus/method-call.parseA.txt @@ -1,8 +1,15 @@ -(Statements - (Call - (MemberAccess - (Identifier) - (Identifier)) - (Identifier) - (TextElement) - (Empty))) +(Program + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (MemberExpression + (PropertyIdentifier "someMethod") + (Expression + (Identifier "object")))) + (Arguments + (Expression + (Identifier "arg1")) + (Expression + (String)))))))) diff --git a/test/fixtures/javascript/corpus/method-call.parseB.txt b/test/fixtures/javascript/corpus/method-call.parseB.txt index 447b0ae78..87d432c28 100644 --- a/test/fixtures/javascript/corpus/method-call.parseB.txt +++ b/test/fixtures/javascript/corpus/method-call.parseB.txt @@ -1,8 +1,15 @@ -(Statements - (Call - (MemberAccess - (Identifier) - (Identifier)) - (Identifier) - (TextElement) - (Empty))) +(Program + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (MemberExpression + (PropertyIdentifier "someMethod") + (Expression + (Identifier "object")))) + (Arguments + (Expression + (Identifier "arg1")) + (Expression + (String)))))))) diff --git a/test/fixtures/javascript/corpus/named-function.parseA.txt b/test/fixtures/javascript/corpus/named-function.parseA.txt index c1953a1de..0cda33e83 100644 --- a/test/fixtures/javascript/corpus/named-function.parseA.txt +++ b/test/fixtures/javascript/corpus/named-function.parseA.txt @@ -1,18 +1,17 @@ -(Statements - (Function - (Empty) - (Empty) - (Identifier) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Identifier))) - (Empty)) +(Program + (Statement + (Declaration + (FunctionDeclaration + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (Identifier "arg2"))))) + (Identifier "myFunction") + (FormalParameters + (RequiredParameter + (Identifier "arg1")) + (RequiredParameter + (Identifier "arg2")))))) + (Statement + (EmptyStatement ";"))) diff --git a/test/fixtures/javascript/corpus/named-function.parseB.txt b/test/fixtures/javascript/corpus/named-function.parseB.txt index 635f5b4bb..d6c28317a 100644 --- a/test/fixtures/javascript/corpus/named-function.parseB.txt +++ b/test/fixtures/javascript/corpus/named-function.parseB.txt @@ -1,9 +1,13 @@ -(Statements - (Function - (Empty) - (Empty) - (Identifier) - (StatementBlock - (Return - (Boolean)))) - (Empty)) +(Program + (Statement + (Declaration + (FunctionDeclaration + (StatementBlock + (Statement + (ReturnStatement + (Expression + (False "false"))))) + (Identifier "anotherFunction") + (FormalParameters)))) + (Statement + (EmptyStatement ";"))) diff --git a/test/fixtures/javascript/corpus/nested-do-while-in-function.parseA.txt b/test/fixtures/javascript/corpus/nested-do-while-in-function.parseA.txt index 1686da7c1..2f4755aa2 100644 --- a/test/fixtures/javascript/corpus/nested-do-while-in-function.parseA.txt +++ b/test/fixtures/javascript/corpus/nested-do-while-in-function.parseA.txt @@ -1,23 +1,27 @@ -(Statements - (Function - (Empty) - (Empty) - (Identifier) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (DoWhile - (Identifier) - (Statements - (Call - (Identifier) - (Identifier) - (Empty))))))) +(Program + (Statement + (Declaration + (FunctionDeclaration + (StatementBlock + (Statement + (DoStatement + (Statement + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (Identifier "something")) + (Arguments + (Expression + (Identifier "arg1"))))))))) + (ParenthesizedExpression + (Expression + (Identifier "arg2")))))) + (Identifier "f") + (FormalParameters + (RequiredParameter + (Identifier "arg1")) + (RequiredParameter + (Identifier "arg2"))))))) diff --git a/test/fixtures/javascript/corpus/nested-do-while-in-function.parseB.txt b/test/fixtures/javascript/corpus/nested-do-while-in-function.parseB.txt index 1686da7c1..24ccf3949 100644 --- a/test/fixtures/javascript/corpus/nested-do-while-in-function.parseB.txt +++ b/test/fixtures/javascript/corpus/nested-do-while-in-function.parseB.txt @@ -1,23 +1,27 @@ -(Statements - (Function - (Empty) - (Empty) - (Identifier) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (DoWhile - (Identifier) - (Statements - (Call - (Identifier) - (Identifier) - (Empty))))))) +(Program + (Statement + (Declaration + (FunctionDeclaration + (StatementBlock + (Statement + (DoStatement + (Statement + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (Identifier "something")) + (Arguments + (Expression + (Identifier "arg2"))))))))) + (ParenthesizedExpression + (Expression + (Identifier "arg1")))))) + (Identifier "f") + (FormalParameters + (RequiredParameter + (Identifier "arg1")) + (RequiredParameter + (Identifier "arg2"))))))) diff --git a/test/fixtures/javascript/corpus/nested-functions.parseA.txt b/test/fixtures/javascript/corpus/nested-functions.parseA.txt index e2ed7efc6..87a0a9877 100644 --- a/test/fixtures/javascript/corpus/nested-functions.parseA.txt +++ b/test/fixtures/javascript/corpus/nested-functions.parseA.txt @@ -1,43 +1,45 @@ -(Statements - (Function - (Empty) - (Empty) - (Identifier) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Function - (Empty) - (Empty) - (Identifier) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Call - (MemberAccess - (Identifier) - (Identifier)) - (Identifier) - (Empty)) - (Call - (MemberAccess - (Identifier) - (Identifier)) - (Identifier) - (Empty))))))) +(Program + (Statement + (Declaration + (FunctionDeclaration + (StatementBlock + (Statement + (Declaration + (FunctionDeclaration + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (MemberExpression + (PropertyIdentifier "log") + (Expression + (Identifier "console")))) + (Arguments + (Expression + (Identifier "arg3"))))))) + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (MemberExpression + (PropertyIdentifier "log") + (Expression + (Identifier "console")))) + (Arguments + (Expression + (Identifier "arg4")))))))) + (Identifier "child") + (FormalParameters + (RequiredParameter + (Identifier "arg3")) + (RequiredParameter + (Identifier "arg4"))))))) + (Identifier "parent") + (FormalParameters + (RequiredParameter + (Identifier "arg1")) + (RequiredParameter + (Identifier "arg2"))))))) diff --git a/test/fixtures/javascript/corpus/nested-functions.parseB.txt b/test/fixtures/javascript/corpus/nested-functions.parseB.txt index e2ed7efc6..61537b42c 100644 --- a/test/fixtures/javascript/corpus/nested-functions.parseB.txt +++ b/test/fixtures/javascript/corpus/nested-functions.parseB.txt @@ -1,43 +1,45 @@ -(Statements - (Function - (Empty) - (Empty) - (Identifier) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Function - (Empty) - (Empty) - (Identifier) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Call - (MemberAccess - (Identifier) - (Identifier)) - (Identifier) - (Empty)) - (Call - (MemberAccess - (Identifier) - (Identifier)) - (Identifier) - (Empty))))))) +(Program + (Statement + (Declaration + (FunctionDeclaration + (StatementBlock + (Statement + (Declaration + (FunctionDeclaration + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (MemberExpression + (PropertyIdentifier "log") + (Expression + (Identifier "console")))) + (Arguments + (Expression + (Identifier "arg1"))))))) + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (MemberExpression + (PropertyIdentifier "log") + (Expression + (Identifier "console")))) + (Arguments + (Expression + (Identifier "arg2")))))))) + (Identifier "child") + (FormalParameters + (RequiredParameter + (Identifier "arg3")) + (RequiredParameter + (Identifier "arg4"))))))) + (Identifier "parent") + (FormalParameters + (RequiredParameter + (Identifier "arg1")) + (RequiredParameter + (Identifier "arg2"))))))) diff --git a/test/fixtures/javascript/corpus/null.parseA.txt b/test/fixtures/javascript/corpus/null.parseA.txt index 5c722556e..48ab292e2 100644 --- a/test/fixtures/javascript/corpus/null.parseA.txt +++ b/test/fixtures/javascript/corpus/null.parseA.txt @@ -1,2 +1,5 @@ -(Statements - (Null)) +(Program + (Statement + (ExpressionStatement + (Expression + (Null "null"))))) diff --git a/test/fixtures/javascript/corpus/null.parseB.txt b/test/fixtures/javascript/corpus/null.parseB.txt index 24f16825d..9a5613678 100644 --- a/test/fixtures/javascript/corpus/null.parseB.txt +++ b/test/fixtures/javascript/corpus/null.parseB.txt @@ -1,3 +1,5 @@ -(Statements - (Return - (Null))) +(Program + (Statement + (ReturnStatement + (Expression + (Null "null"))))) diff --git a/test/fixtures/javascript/corpus/number.parseA.txt b/test/fixtures/javascript/corpus/number.parseA.txt index ca689125a..e52f85ba1 100644 --- a/test/fixtures/javascript/corpus/number.parseA.txt +++ b/test/fixtures/javascript/corpus/number.parseA.txt @@ -1,2 +1,5 @@ -(Statements - (Float)) +(Program + (Statement + (ExpressionStatement + (Expression + (Number "101"))))) diff --git a/test/fixtures/javascript/corpus/number.parseB.txt b/test/fixtures/javascript/corpus/number.parseB.txt index ca689125a..a9f2df268 100644 --- a/test/fixtures/javascript/corpus/number.parseB.txt +++ b/test/fixtures/javascript/corpus/number.parseB.txt @@ -1,2 +1,5 @@ -(Statements - (Float)) +(Program + (Statement + (ExpressionStatement + (Expression + (Number "102"))))) diff --git a/test/fixtures/javascript/corpus/object.parseA.txt b/test/fixtures/javascript/corpus/object.parseA.txt index 7a96e8f9f..2cd9f24e2 100644 --- a/test/fixtures/javascript/corpus/object.parseA.txt +++ b/test/fixtures/javascript/corpus/object.parseA.txt @@ -1,5 +1,9 @@ -(Statements - (Hash - (KeyValue - (TextElement) - (TextElement)))) +(Program + (Statement + (ExpressionStatement + (Expression + (Object + (Pair + (Expression + (String)) + (String))))))) diff --git a/test/fixtures/javascript/corpus/object.parseB.txt b/test/fixtures/javascript/corpus/object.parseB.txt index a99262911..09376d123 100644 --- a/test/fixtures/javascript/corpus/object.parseB.txt +++ b/test/fixtures/javascript/corpus/object.parseB.txt @@ -1,11 +1,17 @@ -(Statements - (Hash - (KeyValue - (TextElement) - (TextElement)) - (KeyValue - (TextElement) - (TextElement)) - (KeyValue - (TextElement) - (TextElement)))) +(Program + (Statement + (ExpressionStatement + (Expression + (Object + (Pair + (Expression + (String)) + (String)) + (Pair + (Expression + (String)) + (String)) + (Pair + (Expression + (String)) + (String))))))) diff --git a/test/fixtures/javascript/corpus/objects-with-methods.parseA.txt b/test/fixtures/javascript/corpus/objects-with-methods.parseA.txt index 510dcd765..fa21519de 100644 --- a/test/fixtures/javascript/corpus/objects-with-methods.parseA.txt +++ b/test/fixtures/javascript/corpus/objects-with-methods.parseA.txt @@ -1,23 +1,22 @@ -(Statements - (Hash - (Method - (Empty) - (Empty) - (Empty) - (Empty) - (Identifier) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Return - (Plus - (Identifier) - (Identifier))))))) +(Program + (Statement + (ExpressionStatement + (Expression + (Object + (MethodDefinition + (StatementBlock + (Statement + (ReturnStatement + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "a")) + (Expression + (Identifier "b"))))))) + (PropertyIdentifier "add") + (FormalParameters + (RequiredParameter + (Identifier "a")) + (RequiredParameter + (Identifier "b"))))))))) diff --git a/test/fixtures/javascript/corpus/objects-with-methods.parseB.txt b/test/fixtures/javascript/corpus/objects-with-methods.parseB.txt index 112b1b8d7..0c8c433ab 100644 --- a/test/fixtures/javascript/corpus/objects-with-methods.parseB.txt +++ b/test/fixtures/javascript/corpus/objects-with-methods.parseB.txt @@ -1,23 +1,22 @@ -(Statements - (Hash - (Method - (Empty) - (Empty) - (Empty) - (Empty) - (Identifier) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (RequiredParameter - (Empty) - (Empty) - (Identifier) - (Empty)) - (StatementBlock - (Return - (Minus - (Identifier) - (Identifier))))))) +(Program + (Statement + (ExpressionStatement + (Expression + (Object + (MethodDefinition + (StatementBlock + (Statement + (ReturnStatement + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "a")) + (Expression + (Identifier "b"))))))) + (PropertyIdentifier "subtract") + (FormalParameters + (RequiredParameter + (Identifier "a")) + (RequiredParameter + (Identifier "b"))))))))) diff --git a/test/fixtures/javascript/corpus/regex.parseA.txt b/test/fixtures/javascript/corpus/regex.parseA.txt index b154d3ebe..89f64913b 100644 --- a/test/fixtures/javascript/corpus/regex.parseA.txt +++ b/test/fixtures/javascript/corpus/regex.parseA.txt @@ -1,2 +1,7 @@ -(Statements - (Regex)) +(Program + (Statement + (ExpressionStatement + (Expression + (Regex + (RegexFlags "g") + (RegexPattern "one")))))) diff --git a/test/fixtures/javascript/corpus/regex.parseB.txt b/test/fixtures/javascript/corpus/regex.parseB.txt index b154d3ebe..c71a96e15 100644 --- a/test/fixtures/javascript/corpus/regex.parseB.txt +++ b/test/fixtures/javascript/corpus/regex.parseB.txt @@ -1,2 +1,7 @@ -(Statements - (Regex)) +(Program + (Statement + (ExpressionStatement + (Expression + (Regex + (RegexFlags "gim") + (RegexPattern "on[^/]afe")))))) diff --git a/test/fixtures/javascript/corpus/relational-operator.parseA.txt b/test/fixtures/javascript/corpus/relational-operator.parseA.txt index 4bacd5c81..39e1b0511 100644 --- a/test/fixtures/javascript/corpus/relational-operator.parseA.txt +++ b/test/fixtures/javascript/corpus/relational-operator.parseA.txt @@ -1,4 +1,10 @@ -(Statements - (LessThan - (Identifier) - (Identifier))) +(Program + (Statement + (ExpressionStatement + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "x")) + (Expression + (Identifier "y"))))))) diff --git a/test/fixtures/javascript/corpus/relational-operator.parseB.txt b/test/fixtures/javascript/corpus/relational-operator.parseB.txt index eb9125c71..39e1b0511 100644 --- a/test/fixtures/javascript/corpus/relational-operator.parseB.txt +++ b/test/fixtures/javascript/corpus/relational-operator.parseB.txt @@ -1,4 +1,10 @@ -(Statements - (LessThanEqual - (Identifier) - (Identifier))) +(Program + (Statement + (ExpressionStatement + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "x")) + (Expression + (Identifier "y"))))))) diff --git a/test/fixtures/javascript/corpus/return-statement.parseA.txt b/test/fixtures/javascript/corpus/return-statement.parseA.txt index fd629221e..d82329d1d 100644 --- a/test/fixtures/javascript/corpus/return-statement.parseA.txt +++ b/test/fixtures/javascript/corpus/return-statement.parseA.txt @@ -1,3 +1,5 @@ -(Statements - (Return - (Float))) +(Program + (Statement + (ReturnStatement + (Expression + (Number "5"))))) diff --git a/test/fixtures/javascript/corpus/return-statement.parseB.txt b/test/fixtures/javascript/corpus/return-statement.parseB.txt index 878ee5e75..034d014ad 100644 --- a/test/fixtures/javascript/corpus/return-statement.parseB.txt +++ b/test/fixtures/javascript/corpus/return-statement.parseB.txt @@ -1,3 +1,3 @@ -(Statements - (Return - (Empty))) +(Program + (Statement + (ReturnStatement))) diff --git a/test/fixtures/javascript/corpus/string.parseA.txt b/test/fixtures/javascript/corpus/string.parseA.txt index 244724dcd..1d43efb30 100644 --- a/test/fixtures/javascript/corpus/string.parseA.txt +++ b/test/fixtures/javascript/corpus/string.parseA.txt @@ -1,2 +1,5 @@ -(Statements - (TextElement)) +(Program + (Statement + (ExpressionStatement + (Expression + (String))))) diff --git a/test/fixtures/javascript/corpus/string.parseB.txt b/test/fixtures/javascript/corpus/string.parseB.txt index 244724dcd..1d43efb30 100644 --- a/test/fixtures/javascript/corpus/string.parseB.txt +++ b/test/fixtures/javascript/corpus/string.parseB.txt @@ -1,2 +1,5 @@ -(Statements - (TextElement)) +(Program + (Statement + (ExpressionStatement + (Expression + (String))))) diff --git a/test/fixtures/javascript/corpus/subscript-access-assignment.parseA.txt b/test/fixtures/javascript/corpus/subscript-access-assignment.parseA.txt index 065c52c81..54b1595a8 100644 --- a/test/fixtures/javascript/corpus/subscript-access-assignment.parseA.txt +++ b/test/fixtures/javascript/corpus/subscript-access-assignment.parseA.txt @@ -1,6 +1,12 @@ -(Statements - (Assignment - (Subscript - (Identifier) - (TextElement)) - (Float))) +(Program + (Statement + (ExpressionStatement + (Expression + (AssignmentExpression + (SubscriptExpression + (Expression + (Identifier "y")) + (Expression + (String))) + (Expression + (Number "0"))))))) diff --git a/test/fixtures/javascript/corpus/subscript-access-assignment.parseB.txt b/test/fixtures/javascript/corpus/subscript-access-assignment.parseB.txt index 065c52c81..3303da8dd 100644 --- a/test/fixtures/javascript/corpus/subscript-access-assignment.parseB.txt +++ b/test/fixtures/javascript/corpus/subscript-access-assignment.parseB.txt @@ -1,6 +1,12 @@ -(Statements - (Assignment - (Subscript - (Identifier) - (TextElement)) - (Float))) +(Program + (Statement + (ExpressionStatement + (Expression + (AssignmentExpression + (SubscriptExpression + (Expression + (Identifier "y")) + (Expression + (String))) + (Expression + (Number "1"))))))) diff --git a/test/fixtures/javascript/corpus/subscript-access-string.parseA.txt b/test/fixtures/javascript/corpus/subscript-access-string.parseA.txt index 5d5853ad7..329f8704b 100644 --- a/test/fixtures/javascript/corpus/subscript-access-string.parseA.txt +++ b/test/fixtures/javascript/corpus/subscript-access-string.parseA.txt @@ -1,4 +1,9 @@ -(Statements - (Subscript - (Identifier) - (TextElement))) +(Program + (Statement + (ExpressionStatement + (Expression + (SubscriptExpression + (Expression + (Identifier "x")) + (Expression + (String))))))) diff --git a/test/fixtures/javascript/corpus/subscript-access-string.parseB.txt b/test/fixtures/javascript/corpus/subscript-access-string.parseB.txt index 5d5853ad7..329f8704b 100644 --- a/test/fixtures/javascript/corpus/subscript-access-string.parseB.txt +++ b/test/fixtures/javascript/corpus/subscript-access-string.parseB.txt @@ -1,4 +1,9 @@ -(Statements - (Subscript - (Identifier) - (TextElement))) +(Program + (Statement + (ExpressionStatement + (Expression + (SubscriptExpression + (Expression + (Identifier "x")) + (Expression + (String))))))) diff --git a/test/fixtures/javascript/corpus/subscript-access-variable.parseA.txt b/test/fixtures/javascript/corpus/subscript-access-variable.parseA.txt index e2c7fbd55..649b3f104 100644 --- a/test/fixtures/javascript/corpus/subscript-access-variable.parseA.txt +++ b/test/fixtures/javascript/corpus/subscript-access-variable.parseA.txt @@ -1,4 +1,9 @@ -(Statements - (Subscript - (Identifier) - (Identifier))) +(Program + (Statement + (ExpressionStatement + (Expression + (SubscriptExpression + (Expression + (Identifier "x")) + (Expression + (Identifier "someVariable"))))))) diff --git a/test/fixtures/javascript/corpus/subscript-access-variable.parseB.txt b/test/fixtures/javascript/corpus/subscript-access-variable.parseB.txt index e2c7fbd55..ef7541380 100644 --- a/test/fixtures/javascript/corpus/subscript-access-variable.parseB.txt +++ b/test/fixtures/javascript/corpus/subscript-access-variable.parseB.txt @@ -1,4 +1,9 @@ -(Statements - (Subscript - (Identifier) - (Identifier))) +(Program + (Statement + (ExpressionStatement + (Expression + (SubscriptExpression + (Expression + (Identifier "x")) + (Expression + (Identifier "someOtherVariable"))))))) diff --git a/test/fixtures/javascript/corpus/switch-statement.parseA.txt b/test/fixtures/javascript/corpus/switch-statement.parseA.txt index 50a633ec5..e0a1277be 100644 --- a/test/fixtures/javascript/corpus/switch-statement.parseA.txt +++ b/test/fixtures/javascript/corpus/switch-statement.parseA.txt @@ -1,17 +1,30 @@ -(Statements - (Match - (Float) - (Statements - (Pattern - (Float) - (Statements - (Float))) - (Pattern - (Float) - (Statements - (Float))) - (Pattern - (Float) - (Statements - (Float))))) - (Empty)) +(Program + (Statement + (SwitchStatement + (SwitchBody + (SwitchCase + (Expression + (Number "1")) + (Statement + (ExpressionStatement + (Expression + (Number "1"))))) + (SwitchCase + (Expression + (Number "2")) + (Statement + (ExpressionStatement + (Expression + (Number "1"))))) + (SwitchCase + (Expression + (Number "3")) + (Statement + (ExpressionStatement + (Expression + (Number "3")))))) + (ParenthesizedExpression + (Expression + (Number "1"))))) + (Statement + (EmptyStatement ";"))) diff --git a/test/fixtures/javascript/corpus/switch-statement.parseB.txt b/test/fixtures/javascript/corpus/switch-statement.parseB.txt index 50a633ec5..87786f3f5 100644 --- a/test/fixtures/javascript/corpus/switch-statement.parseB.txt +++ b/test/fixtures/javascript/corpus/switch-statement.parseB.txt @@ -1,17 +1,30 @@ -(Statements - (Match - (Float) - (Statements - (Pattern - (Float) - (Statements - (Float))) - (Pattern - (Float) - (Statements - (Float))) - (Pattern - (Float) - (Statements - (Float))))) - (Empty)) +(Program + (Statement + (SwitchStatement + (SwitchBody + (SwitchCase + (Expression + (Number "1")) + (Statement + (ExpressionStatement + (Expression + (Number "1"))))) + (SwitchCase + (Expression + (Number "2")) + (Statement + (ExpressionStatement + (Expression + (Number "2"))))) + (SwitchCase + (Expression + (Number "3")) + (Statement + (ExpressionStatement + (Expression + (Number "3")))))) + (ParenthesizedExpression + (Expression + (Number "2"))))) + (Statement + (EmptyStatement ";"))) diff --git a/test/fixtures/javascript/corpus/template-string.parseA.txt b/test/fixtures/javascript/corpus/template-string.parseA.txt index d6d776fad..75bebd8e9 100644 --- a/test/fixtures/javascript/corpus/template-string.parseA.txt +++ b/test/fixtures/javascript/corpus/template-string.parseA.txt @@ -1,2 +1,5 @@ -(Statements - (String)) +(Program + (Statement + (ExpressionStatement + (Expression + (TemplateString))))) diff --git a/test/fixtures/javascript/corpus/template-string.parseB.txt b/test/fixtures/javascript/corpus/template-string.parseB.txt index d6d776fad..75bebd8e9 100644 --- a/test/fixtures/javascript/corpus/template-string.parseB.txt +++ b/test/fixtures/javascript/corpus/template-string.parseB.txt @@ -1,2 +1,5 @@ -(Statements - (String)) +(Program + (Statement + (ExpressionStatement + (Expression + (TemplateString))))) diff --git a/test/fixtures/javascript/corpus/ternary.parseA.txt b/test/fixtures/javascript/corpus/ternary.parseA.txt index ff5f03d89..7486c9466 100644 --- a/test/fixtures/javascript/corpus/ternary.parseA.txt +++ b/test/fixtures/javascript/corpus/ternary.parseA.txt @@ -1,5 +1,11 @@ -(Statements - (If - (Identifier) - (Identifier) - (Identifier))) +(Program + (Statement + (ExpressionStatement + (Expression + (TernaryExpression + (Expression + (Identifier "case2")) + (Expression + (Identifier "case1")) + (Expression + (Identifier "condition"))))))) diff --git a/test/fixtures/javascript/corpus/ternary.parseB.txt b/test/fixtures/javascript/corpus/ternary.parseB.txt index 93db1d9d2..24f03ad5a 100644 --- a/test/fixtures/javascript/corpus/ternary.parseB.txt +++ b/test/fixtures/javascript/corpus/ternary.parseB.txt @@ -1,17 +1,29 @@ -(Statements - (Assignment - (MemberAccess - (Identifier) - (Identifier)) - (If - (MemberAccess - (Identifier) - (Identifier)) - (MemberAccess - (Identifier) - (Identifier)) - (MemberAccess - (MemberAccess - (Identifier) - (Identifier)) - (Identifier))))) +(Program + (Statement + (ExpressionStatement + (Expression + (AssignmentExpression + (MemberExpression + (PropertyIdentifier "y") + (Expression + (Identifier "x"))) + (Expression + (TernaryExpression + (Expression + (MemberExpression + (PropertyIdentifier "case") + (Expression + (MemberExpression + (PropertyIdentifier "other") + (Expression + (Identifier "some")))))) + (Expression + (MemberExpression + (PropertyIdentifier "case") + (Expression + (Identifier "some")))) + (Expression + (MemberExpression + (PropertyIdentifier "condition") + (Expression + (Identifier "some"))))))))))) diff --git a/test/fixtures/javascript/corpus/this-expression.parseA.txt b/test/fixtures/javascript/corpus/this-expression.parseA.txt index 2fce35ed5..7a21a8744 100644 --- a/test/fixtures/javascript/corpus/this-expression.parseA.txt +++ b/test/fixtures/javascript/corpus/this-expression.parseA.txt @@ -1,2 +1,5 @@ -(Statements - (This)) +(Program + (Statement + (ExpressionStatement + (Expression + (This "this"))))) diff --git a/test/fixtures/javascript/corpus/this-expression.parseB.txt b/test/fixtures/javascript/corpus/this-expression.parseB.txt index 2ebca766a..28e054b88 100644 --- a/test/fixtures/javascript/corpus/this-expression.parseB.txt +++ b/test/fixtures/javascript/corpus/this-expression.parseB.txt @@ -1,3 +1,5 @@ -(Statements - (Return - (This))) +(Program + (Statement + (ReturnStatement + (Expression + (This "this"))))) diff --git a/test/fixtures/javascript/corpus/throw-statement.parseA.txt b/test/fixtures/javascript/corpus/throw-statement.parseA.txt index dbba82efa..f73f01a1a 100644 --- a/test/fixtures/javascript/corpus/throw-statement.parseA.txt +++ b/test/fixtures/javascript/corpus/throw-statement.parseA.txt @@ -1,6 +1,9 @@ -(Statements - (Throw - (New - (Identifier) - (Empty) - (TextElement)))) +(Program + (Statement + (ThrowStatement + (Expression + (NewExpression + (Arguments + (Expression + (String))) + (Identifier "Error")))))) diff --git a/test/fixtures/javascript/corpus/throw-statement.parseB.txt b/test/fixtures/javascript/corpus/throw-statement.parseB.txt index dbba82efa..f73f01a1a 100644 --- a/test/fixtures/javascript/corpus/throw-statement.parseB.txt +++ b/test/fixtures/javascript/corpus/throw-statement.parseB.txt @@ -1,6 +1,9 @@ -(Statements - (Throw - (New - (Identifier) - (Empty) - (TextElement)))) +(Program + (Statement + (ThrowStatement + (Expression + (NewExpression + (Arguments + (Expression + (String))) + (Identifier "Error")))))) diff --git a/test/fixtures/javascript/corpus/true.parseA.txt b/test/fixtures/javascript/corpus/true.parseA.txt index 25d98872e..aa0ec6291 100644 --- a/test/fixtures/javascript/corpus/true.parseA.txt +++ b/test/fixtures/javascript/corpus/true.parseA.txt @@ -1,2 +1,5 @@ -(Statements - (Boolean)) +(Program + (Statement + (ExpressionStatement + (Expression + (True "true"))))) diff --git a/test/fixtures/javascript/corpus/true.parseB.txt b/test/fixtures/javascript/corpus/true.parseB.txt index 02e3c2a13..a5273bbde 100644 --- a/test/fixtures/javascript/corpus/true.parseB.txt +++ b/test/fixtures/javascript/corpus/true.parseB.txt @@ -1,3 +1,5 @@ -(Statements - (Return - (Boolean))) +(Program + (Statement + (ReturnStatement + (Expression + (True "true"))))) diff --git a/test/fixtures/javascript/corpus/try-statement.parseA.txt b/test/fixtures/javascript/corpus/try-statement.parseA.txt index 00902f275..49738edd6 100644 --- a/test/fixtures/javascript/corpus/try-statement.parseA.txt +++ b/test/fixtures/javascript/corpus/try-statement.parseA.txt @@ -1,12 +1,22 @@ -(Statements - (Try - (Statements - (Identifier)) - (Catch - (Empty) - (Statements - (Identifier))) - (Finally - (Statements - (Identifier)))) - (Empty)) +(Program + (Statement + (TryStatement + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (Identifier "f"))))) + (CatchClause + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (Identifier "g")))))) + (FinallyClause + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (Identifier "h")))))))) + (Statement + (EmptyStatement ";"))) diff --git a/test/fixtures/javascript/corpus/try-statement.parseB.txt b/test/fixtures/javascript/corpus/try-statement.parseB.txt index 00902f275..5728f6c70 100644 --- a/test/fixtures/javascript/corpus/try-statement.parseB.txt +++ b/test/fixtures/javascript/corpus/try-statement.parseB.txt @@ -1,12 +1,22 @@ -(Statements - (Try - (Statements - (Identifier)) - (Catch - (Empty) - (Statements - (Identifier))) - (Finally - (Statements - (Identifier)))) - (Empty)) +(Program + (Statement + (TryStatement + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (Identifier "f"))))) + (CatchClause + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (Identifier "h")))))) + (FinallyClause + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (Identifier "g")))))))) + (Statement + (EmptyStatement ";"))) diff --git a/test/fixtures/javascript/corpus/type-operator.parseA.txt b/test/fixtures/javascript/corpus/type-operator.parseA.txt index f20b03753..06e961690 100644 --- a/test/fixtures/javascript/corpus/type-operator.parseA.txt +++ b/test/fixtures/javascript/corpus/type-operator.parseA.txt @@ -1,3 +1,8 @@ -(Statements - (Typeof - (Identifier))) +(Program + (Statement + (ExpressionStatement + (Expression + (UnaryExpression + (Token) + (Expression + (Identifier "x"))))))) diff --git a/test/fixtures/javascript/corpus/type-operator.parseB.txt b/test/fixtures/javascript/corpus/type-operator.parseB.txt index 6087bffac..e4d8f4ceb 100644 --- a/test/fixtures/javascript/corpus/type-operator.parseB.txt +++ b/test/fixtures/javascript/corpus/type-operator.parseB.txt @@ -1,4 +1,10 @@ -(Statements - (InstanceOf - (Identifier) - (Identifier))) +(Program + (Statement + (ExpressionStatement + (Expression + (BinaryExpression + (Token) + (Expression + (Identifier "x")) + (Expression + (Identifier "String"))))))) diff --git a/test/fixtures/javascript/corpus/undefined.parseA.txt b/test/fixtures/javascript/corpus/undefined.parseA.txt index ea5e6fca6..26370fbb4 100644 --- a/test/fixtures/javascript/corpus/undefined.parseA.txt +++ b/test/fixtures/javascript/corpus/undefined.parseA.txt @@ -1,2 +1,5 @@ -(Statements - (Undefined)) +(Program + (Statement + (ExpressionStatement + (Expression + (Undefined "undefined"))))) diff --git a/test/fixtures/javascript/corpus/undefined.parseB.txt b/test/fixtures/javascript/corpus/undefined.parseB.txt index 58c1a9eaf..d7ad4f1c7 100644 --- a/test/fixtures/javascript/corpus/undefined.parseB.txt +++ b/test/fixtures/javascript/corpus/undefined.parseB.txt @@ -1,3 +1,5 @@ -(Statements - (Return - (Undefined))) +(Program + (Statement + (ReturnStatement + (Expression + (Undefined "undefined"))))) diff --git a/test/fixtures/javascript/corpus/var-declaration.parseA.txt b/test/fixtures/javascript/corpus/var-declaration.parseA.txt index 1634cc36e..7add3ac35 100644 --- a/test/fixtures/javascript/corpus/var-declaration.parseA.txt +++ b/test/fixtures/javascript/corpus/var-declaration.parseA.txt @@ -1,6 +1,8 @@ -(Statements - (VariableDeclaration - (Assignment - (Empty) - (Identifier) - (Float)))) +(Program + (Statement + (Declaration + (VariableDeclaration + (VariableDeclarator + (Expression + (Number "1")) + (Identifier "x")))))) diff --git a/test/fixtures/javascript/corpus/var-declaration.parseB.txt b/test/fixtures/javascript/corpus/var-declaration.parseB.txt index 2ffadbf28..b6166d8f8 100644 --- a/test/fixtures/javascript/corpus/var-declaration.parseB.txt +++ b/test/fixtures/javascript/corpus/var-declaration.parseB.txt @@ -1,14 +1,12 @@ -(Statements - (VariableDeclaration - (Assignment - (Empty) - (Identifier) - (Empty)) - (Assignment - (Empty) - (Identifier) - (Hash)) - (Assignment - (Empty) - (Identifier) - (Empty)))) +(Program + (Statement + (Declaration + (VariableDeclaration + (VariableDeclarator + (Identifier "x")) + (VariableDeclarator + (Expression + (Object)) + (Identifier "y")) + (VariableDeclarator + (Identifier "z")))))) diff --git a/test/fixtures/javascript/corpus/variable.parseA.txt b/test/fixtures/javascript/corpus/variable.parseA.txt index 5f0ab64c1..ee3655799 100644 --- a/test/fixtures/javascript/corpus/variable.parseA.txt +++ b/test/fixtures/javascript/corpus/variable.parseA.txt @@ -1,2 +1,5 @@ -(Statements - (Identifier)) +(Program + (Statement + (ExpressionStatement + (Expression + (Identifier "theVar"))))) diff --git a/test/fixtures/javascript/corpus/variable.parseB.txt b/test/fixtures/javascript/corpus/variable.parseB.txt index 5f0ab64c1..420643ed8 100644 --- a/test/fixtures/javascript/corpus/variable.parseB.txt +++ b/test/fixtures/javascript/corpus/variable.parseB.txt @@ -1,2 +1,5 @@ -(Statements - (Identifier)) +(Program + (Statement + (ExpressionStatement + (Expression + (Identifier "theVar2"))))) diff --git a/test/fixtures/javascript/corpus/void-operator.parseA.txt b/test/fixtures/javascript/corpus/void-operator.parseA.txt index 71bb37891..c5d371aa5 100644 --- a/test/fixtures/javascript/corpus/void-operator.parseA.txt +++ b/test/fixtures/javascript/corpus/void-operator.parseA.txt @@ -1,5 +1,11 @@ -(Statements - (Void - (Call - (Identifier) - (Empty)))) +(Program + (Statement + (ExpressionStatement + (Expression + (UnaryExpression + (Token) + (Expression + (CallExpression + (Expression + (Identifier "b")) + (Arguments)))))))) diff --git a/test/fixtures/javascript/corpus/void-operator.parseB.txt b/test/fixtures/javascript/corpus/void-operator.parseB.txt index 71bb37891..486e852f3 100644 --- a/test/fixtures/javascript/corpus/void-operator.parseB.txt +++ b/test/fixtures/javascript/corpus/void-operator.parseB.txt @@ -1,5 +1,11 @@ -(Statements - (Void - (Call - (Identifier) - (Empty)))) +(Program + (Statement + (ExpressionStatement + (Expression + (UnaryExpression + (Token) + (Expression + (CallExpression + (Expression + (Identifier "c")) + (Arguments)))))))) diff --git a/test/fixtures/javascript/corpus/while-statement.parseA.txt b/test/fixtures/javascript/corpus/while-statement.parseA.txt index 9d2e8f0d8..edb9d27fb 100644 --- a/test/fixtures/javascript/corpus/while-statement.parseA.txt +++ b/test/fixtures/javascript/corpus/while-statement.parseA.txt @@ -1,8 +1,17 @@ -(Statements - (While - (Identifier) - (Statements - (Call - (Identifier) - (Empty)))) - (Empty)) +(Program + (Statement + (WhileStatement + (Statement + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (Identifier "b")) + (Arguments))))))) + (ParenthesizedExpression + (Expression + (Identifier "a"))))) + (Statement + (EmptyStatement ";"))) diff --git a/test/fixtures/javascript/corpus/while-statement.parseB.txt b/test/fixtures/javascript/corpus/while-statement.parseB.txt index 9d2e8f0d8..d9c98394d 100644 --- a/test/fixtures/javascript/corpus/while-statement.parseB.txt +++ b/test/fixtures/javascript/corpus/while-statement.parseB.txt @@ -1,8 +1,17 @@ -(Statements - (While - (Identifier) - (Statements - (Call - (Identifier) - (Empty)))) - (Empty)) +(Program + (Statement + (WhileStatement + (Statement + (StatementBlock + (Statement + (ExpressionStatement + (Expression + (CallExpression + (Expression + (Identifier "a")) + (Arguments))))))) + (ParenthesizedExpression + (Expression + (Identifier "b"))))) + (Statement + (EmptyStatement ";"))) diff --git a/test/fixtures/javascript/corpus/yield.parseA.txt b/test/fixtures/javascript/corpus/yield.parseA.txt index c1ee0ed8e..5b2b9a254 100644 --- a/test/fixtures/javascript/corpus/yield.parseA.txt +++ b/test/fixtures/javascript/corpus/yield.parseA.txt @@ -1,13 +1,20 @@ -(Statements - (Function - (Empty) - (Empty) - (Identifier) - (StatementBlock - (VariableDeclaration - (Assignment - (Empty) - (Identifier) - (Float))) - (Yield - (Identifier))))) +(Program + (Statement + (Declaration + (GeneratorFunctionDeclaration + (StatementBlock + (Statement + (Declaration + (VariableDeclaration + (VariableDeclarator + (Expression + (Number "0")) + (Identifier "index"))))) + (Statement + (ExpressionStatement + (Expression + (YieldExpression + (Expression + (Identifier "i"))))))) + (Identifier "foo") + (FormalParameters))))) diff --git a/test/fixtures/javascript/corpus/yield.parseB.txt b/test/fixtures/javascript/corpus/yield.parseB.txt index 149b2ad44..492c1ced7 100644 --- a/test/fixtures/javascript/corpus/yield.parseB.txt +++ b/test/fixtures/javascript/corpus/yield.parseB.txt @@ -1,14 +1,23 @@ -(Statements - (Function - (Empty) - (Empty) - (Identifier) - (StatementBlock - (VariableDeclaration - (Assignment - (Empty) - (Identifier) - (Float))) - (Yield - (Update - (Identifier)))))) +(Program + (Statement + (Declaration + (GeneratorFunctionDeclaration + (StatementBlock + (Statement + (Declaration + (VariableDeclaration + (VariableDeclarator + (Expression + (Number "0")) + (Identifier "index"))))) + (Statement + (ExpressionStatement + (Expression + (YieldExpression + (Expression + (UpdateExpression + (Token) + (Expression + (Identifier "i"))))))))) + (Identifier "foo") + (FormalParameters))))) diff --git a/test/fixtures/json/corpus/array.diffA-B.txt b/test/fixtures/json/corpus/array.diffA-B.txt new file mode 100644 index 000000000..e69de29bb diff --git a/test/fixtures/json/corpus/array.parseA.txt b/test/fixtures/json/corpus/array.parseA.txt index 6c67c2f65..401490886 100644 --- a/test/fixtures/json/corpus/array.parseA.txt +++ b/test/fixtures/json/corpus/array.parseA.txt @@ -1,14 +1,13 @@ (Document (Value (Array - [ - (Value - (Number "1")) - (Value - (Number "3")) - (Value - (Number "3")) - (Value - (Number "5")) - (Value - (Number "7")) ]))) + (Value + (Number "1")) + (Value + (Number "3")) + (Value + (Number "3")) + (Value + (Number "5")) + (Value + (Number "7"))))) diff --git a/test/fixtures/json/corpus/array.parseB.txt b/test/fixtures/json/corpus/array.parseB.txt index 5f0d2c85a..560d8baa5 100644 --- a/test/fixtures/json/corpus/array.parseB.txt +++ b/test/fixtures/json/corpus/array.parseB.txt @@ -1,14 +1,13 @@ (Document (Value (Array - [ - (Value - (Number "2")) - (Value - (Number "3")) - (Value - (Number "4")) - (Value - (Number "5")) - (Value - (Number "6")) ]))) + (Value + (Number "2")) + (Value + (Number "3")) + (Value + (Number "4")) + (Value + (Number "5")) + (Value + (Number "6"))))) diff --git a/test/fixtures/python/corpus/assert-statement.parseA.txt b/test/fixtures/python/corpus/assert-statement.parseA.txt index ad22b5d53..becb758a2 100644 --- a/test/fixtures/python/corpus/assert-statement.parseA.txt +++ b/test/fixtures/python/corpus/assert-statement.parseA.txt @@ -1,12 +1,14 @@ -(Statements - (Call - (Identifier) - (Identifier) - (Empty)) - (Context - (Comment) - (Call - (Identifier) - (Identifier) - (Identifier) - (Empty)))) +(Module + (SimpleStatement + (AssertStatement + (Expression + (PrimaryExpression + (Identifier "a"))))) + (SimpleStatement + (AssertStatement + (Expression + (PrimaryExpression + (Identifier "b"))) + (Expression + (PrimaryExpression + (Identifier "c")))))) diff --git a/test/fixtures/python/corpus/assert-statement.parseB.txt b/test/fixtures/python/corpus/assert-statement.parseB.txt index eaeb4c216..778b99144 100644 --- a/test/fixtures/python/corpus/assert-statement.parseB.txt +++ b/test/fixtures/python/corpus/assert-statement.parseB.txt @@ -1,13 +1,14 @@ -(Statements - (Call - (Identifier) - (Identifier) - (Identifier) - (Empty)) - (Call - (Identifier) - (Identifier) - (Empty)) - (Context - (Comment) - (Empty))) +(Module + (SimpleStatement + (AssertStatement + (Expression + (PrimaryExpression + (Identifier "c"))) + (Expression + (PrimaryExpression + (Identifier "a"))))) + (SimpleStatement + (AssertStatement + (Expression + (PrimaryExpression + (Identifier "b")))))) diff --git a/test/fixtures/python/corpus/assignment.parseA.txt b/test/fixtures/python/corpus/assignment.parseA.txt index f012ce5dd..78d1775c2 100644 --- a/test/fixtures/python/corpus/assignment.parseA.txt +++ b/test/fixtures/python/corpus/assignment.parseA.txt @@ -1,16 +1,43 @@ -(Statements - (Assignment - (Identifier) - (Integer)) - (Assignment - (Statements - (Identifier) - (Identifier)) - (Statements - (Integer) - (Integer))) - (Assignment - (Identifier) - (Statements - (Integer) - (Integer)))) +(Module + (SimpleStatement + (ExpressionStatement + (Assignment + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "a")))) + (ExpressionList + (Expression + (PrimaryExpression + (Integer "1"))))))) + (SimpleStatement + (ExpressionStatement + (Assignment + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "a"))) + (Expression + (PrimaryExpression + (Identifier "b")))) + (ExpressionList + (Expression + (PrimaryExpression + (Integer "1"))) + (Expression + (PrimaryExpression + (Integer "2"))))))) + (SimpleStatement + (ExpressionStatement + (Assignment + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "a")))) + (ExpressionList + (Expression + (PrimaryExpression + (Integer "1"))) + (Expression + (PrimaryExpression + (Integer "2")))))))) diff --git a/test/fixtures/python/corpus/assignment.parseB.txt b/test/fixtures/python/corpus/assignment.parseB.txt index c22a7c109..e33523996 100644 --- a/test/fixtures/python/corpus/assignment.parseB.txt +++ b/test/fixtures/python/corpus/assignment.parseB.txt @@ -1,16 +1,43 @@ -(Statements - (Assignment - (Statements - (Identifier) - (Identifier)) - (Statements - (Integer) - (Integer))) - (Assignment - (Identifier) - (Integer)) - (Assignment - (Identifier) - (Statements - (Integer) - (Integer)))) +(Module + (SimpleStatement + (ExpressionStatement + (Assignment + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "a"))) + (Expression + (PrimaryExpression + (Identifier "b")))) + (ExpressionList + (Expression + (PrimaryExpression + (Integer "2"))) + (Expression + (PrimaryExpression + (Integer "1"))))))) + (SimpleStatement + (ExpressionStatement + (Assignment + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "c")))) + (ExpressionList + (Expression + (PrimaryExpression + (Integer "1"))))))) + (SimpleStatement + (ExpressionStatement + (Assignment + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "b")))) + (ExpressionList + (Expression + (PrimaryExpression + (Integer "1"))) + (Expression + (PrimaryExpression + (Integer "2")))))))) diff --git a/test/fixtures/python/corpus/async-function-definition.parseA.txt b/test/fixtures/python/corpus/async-function-definition.parseA.txt index 54fde157c..e077bfcf0 100644 --- a/test/fixtures/python/corpus/async-function-definition.parseA.txt +++ b/test/fixtures/python/corpus/async-function-definition.parseA.txt @@ -1,19 +1,37 @@ -(Statements - (Function - (Identifier) - (Statements - (Identifier))) - (Function - (Identifier) - (RequiredParameter - (Identifier)) - (RequiredParameter - (Identifier)) - (Statements - (Identifier))) - (Function - (Identifier) - (RequiredParameter - (Identifier)) - (Statements - (Identifier)))) +(Module + (CompoundStatement + (FunctionDefinition + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "b")))))) + (Identifier "a") + (Parameters))) + (CompoundStatement + (FunctionDefinition + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "i")))))) + (Identifier "b") + (Parameters + (Parameter + (Identifier "h")) + (Parameter + (Identifier "i"))))) + (CompoundStatement + (FunctionDefinition + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "d")))))) + (Identifier "c") + (Parameters + (Parameter + (Identifier "d")))))) diff --git a/test/fixtures/python/corpus/async-function-definition.parseB.txt b/test/fixtures/python/corpus/async-function-definition.parseB.txt index 7eb7d5ff5..aaee70402 100644 --- a/test/fixtures/python/corpus/async-function-definition.parseB.txt +++ b/test/fixtures/python/corpus/async-function-definition.parseB.txt @@ -1,19 +1,37 @@ -(Statements - (Function - (Identifier) - (RequiredParameter - (Identifier)) - (RequiredParameter - (Identifier)) - (Statements - (Identifier))) - (Function - (Identifier) - (Statements - (Identifier))) - (Function - (Identifier) - (RequiredParameter - (Identifier)) - (Statements - (Identifier)))) +(Module + (CompoundStatement + (FunctionDefinition + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "j")))))) + (Identifier "g") + (Parameters + (Parameter + (Identifier "i")) + (Parameter + (Identifier "j"))))) + (CompoundStatement + (FunctionDefinition + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "c")))))) + (Identifier "a") + (Parameters))) + (CompoundStatement + (FunctionDefinition + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "e")))))) + (Identifier "d") + (Parameters + (Parameter + (Identifier "c")))))) diff --git a/test/fixtures/python/corpus/attribute.parseA.txt b/test/fixtures/python/corpus/attribute.parseA.txt index 70674960a..34b580e34 100644 --- a/test/fixtures/python/corpus/attribute.parseA.txt +++ b/test/fixtures/python/corpus/attribute.parseA.txt @@ -1,4 +1,9 @@ -(Statements - (MemberAccess - (Identifier) - (Identifier))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Attribute + (Identifier "b") + (PrimaryExpression + (Identifier "a")))))))) diff --git a/test/fixtures/python/corpus/attribute.parseB.txt b/test/fixtures/python/corpus/attribute.parseB.txt index 9d14d98a7..6a9ac0713 100644 --- a/test/fixtures/python/corpus/attribute.parseB.txt +++ b/test/fixtures/python/corpus/attribute.parseB.txt @@ -1,6 +1,12 @@ -(Statements - (MemberAccess - (MemberAccess - (Identifier) - (Identifier)) - (Identifier))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Attribute + (Identifier "c") + (PrimaryExpression + (Attribute + (Identifier "b") + (PrimaryExpression + (Identifier "a")))))))))) diff --git a/test/fixtures/python/corpus/augmented-assignment.parseA.txt b/test/fixtures/python/corpus/augmented-assignment.parseA.txt index ab2f84566..e5b9a16e4 100644 --- a/test/fixtures/python/corpus/augmented-assignment.parseA.txt +++ b/test/fixtures/python/corpus/augmented-assignment.parseA.txt @@ -1,13 +1,37 @@ -(Statements - (AugmentedAssignment - (Plus - (Identifier) - (Integer))) - (AugmentedAssignment - (RShift - (Identifier) - (Integer))) - (AugmentedAssignment - (DividedBy - (Identifier) - (Integer)))) +(Module + (SimpleStatement + (ExpressionStatement + (AugmentedAssignment + (Token) + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "a")))) + (ExpressionList + (Expression + (PrimaryExpression + (Integer "1"))))))) + (SimpleStatement + (ExpressionStatement + (AugmentedAssignment + (Token) + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "b")))) + (ExpressionList + (Expression + (PrimaryExpression + (Integer "2"))))))) + (SimpleStatement + (ExpressionStatement + (AugmentedAssignment + (Token) + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "c")))) + (ExpressionList + (Expression + (PrimaryExpression + (Integer "1")))))))) diff --git a/test/fixtures/python/corpus/augmented-assignment.parseB.txt b/test/fixtures/python/corpus/augmented-assignment.parseB.txt index d661db51c..a0d26b2ea 100644 --- a/test/fixtures/python/corpus/augmented-assignment.parseB.txt +++ b/test/fixtures/python/corpus/augmented-assignment.parseB.txt @@ -1,13 +1,37 @@ -(Statements - (AugmentedAssignment - (RShift - (Identifier) - (Integer))) - (AugmentedAssignment - (DividedBy - (Identifier) - (Integer))) - (AugmentedAssignment - (Plus - (Identifier) - (Integer)))) +(Module + (SimpleStatement + (ExpressionStatement + (AugmentedAssignment + (Token) + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "a")))) + (ExpressionList + (Expression + (PrimaryExpression + (Integer "2"))))))) + (SimpleStatement + (ExpressionStatement + (AugmentedAssignment + (Token) + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "d")))) + (ExpressionList + (Expression + (PrimaryExpression + (Integer "1"))))))) + (SimpleStatement + (ExpressionStatement + (AugmentedAssignment + (Token) + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "b")))) + (ExpressionList + (Expression + (PrimaryExpression + (Integer "1")))))))) diff --git a/test/fixtures/python/corpus/await.parseA.txt b/test/fixtures/python/corpus/await.parseA.txt index 0cdfe52de..05f89877f 100644 --- a/test/fixtures/python/corpus/await.parseA.txt +++ b/test/fixtures/python/corpus/await.parseA.txt @@ -1,11 +1,20 @@ -(Statements - (Call - (Identifier) - (Plus - (Integer) - (Integer)) - (Empty)) - (Call - (Identifier) - (Identifier) - (Empty))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (Await + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Integer "1")) + (PrimaryExpression + (Integer "1"))))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (Await + (Expression + (PrimaryExpression + (Identifier "b")))))))) diff --git a/test/fixtures/python/corpus/await.parseB.txt b/test/fixtures/python/corpus/await.parseB.txt index 0cdfe52de..5b7c90f6f 100644 --- a/test/fixtures/python/corpus/await.parseB.txt +++ b/test/fixtures/python/corpus/await.parseB.txt @@ -1,11 +1,20 @@ -(Statements - (Call - (Identifier) - (Plus - (Integer) - (Integer)) - (Empty)) - (Call - (Identifier) - (Identifier) - (Empty))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (Await + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Integer "2")) + (PrimaryExpression + (Integer "1"))))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (Await + (Expression + (PrimaryExpression + (Identifier "c")))))))) diff --git a/test/fixtures/python/corpus/binary-operator.parseA.txt b/test/fixtures/python/corpus/binary-operator.parseA.txt index f4df7c95b..ff9b377ba 100644 --- a/test/fixtures/python/corpus/binary-operator.parseA.txt +++ b/test/fixtures/python/corpus/binary-operator.parseA.txt @@ -1,37 +1,121 @@ -(Statements - (Plus - (Identifier) - (Identifier)) - (Minus - (Identifier) - (Identifier)) - (Times - (Identifier) - (Identifier)) - (DividedBy - (Identifier) - (Identifier)) - (Modulo - (Identifier) - (Identifier)) - (FloorDivision - (Identifier) - (Identifier)) - (Power - (Identifier) - (Identifier)) - (BOr - (Identifier) - (Identifier)) - (BAnd - (Identifier) - (Identifier)) - (BXOr - (Identifier) - (Identifier)) - (LShift - (Identifier) - (Identifier)) - (RShift - (Identifier) - (Identifier))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "a")) + (PrimaryExpression + (Identifier "b"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "c")) + (PrimaryExpression + (Identifier "d"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "e")) + (PrimaryExpression + (Identifier "f"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "g")) + (PrimaryExpression + (Identifier "h"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "i")) + (PrimaryExpression + (Identifier "j"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "k")) + (PrimaryExpression + (Identifier "l"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "m")) + (PrimaryExpression + (Identifier "n"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "o")) + (PrimaryExpression + (Identifier "p"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "q")) + (PrimaryExpression + (Identifier "r"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "s")) + (PrimaryExpression + (Identifier "t"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "u")) + (PrimaryExpression + (Identifier "v"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "w")) + (PrimaryExpression + (Identifier "x")))))))) diff --git a/test/fixtures/python/corpus/binary-operator.parseB.txt b/test/fixtures/python/corpus/binary-operator.parseB.txt index c98dc7627..ff9b377ba 100644 --- a/test/fixtures/python/corpus/binary-operator.parseB.txt +++ b/test/fixtures/python/corpus/binary-operator.parseB.txt @@ -1,37 +1,121 @@ -(Statements - (RShift - (Identifier) - (Identifier)) - (LShift - (Identifier) - (Identifier)) - (BXOr - (Identifier) - (Identifier)) - (BAnd - (Identifier) - (Identifier)) - (Modulo - (Identifier) - (Identifier)) - (Power - (Identifier) - (Identifier)) - (FloorDivision - (Identifier) - (Identifier)) - (Modulo - (Identifier) - (Identifier)) - (DividedBy - (Identifier) - (Identifier)) - (Times - (Identifier) - (Identifier)) - (Minus - (Identifier) - (Identifier)) - (Plus - (Identifier) - (Identifier))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "a")) + (PrimaryExpression + (Identifier "b"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "c")) + (PrimaryExpression + (Identifier "d"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "e")) + (PrimaryExpression + (Identifier "f"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "g")) + (PrimaryExpression + (Identifier "h"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "i")) + (PrimaryExpression + (Identifier "j"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "k")) + (PrimaryExpression + (Identifier "l"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "m")) + (PrimaryExpression + (Identifier "n"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "o")) + (PrimaryExpression + (Identifier "p"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "q")) + (PrimaryExpression + (Identifier "r"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "s")) + (PrimaryExpression + (Identifier "t"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "u")) + (PrimaryExpression + (Identifier "v"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "w")) + (PrimaryExpression + (Identifier "x")))))))) diff --git a/test/fixtures/python/corpus/boolean-operator.parseA.txt b/test/fixtures/python/corpus/boolean-operator.parseA.txt index c7052e778..c61238442 100644 --- a/test/fixtures/python/corpus/boolean-operator.parseA.txt +++ b/test/fixtures/python/corpus/boolean-operator.parseA.txt @@ -1,7 +1,23 @@ -(Statements - (And - (Identifier) - (Identifier)) - (Or - (Identifier) - (Identifier))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (BooleanOperator + (Token) + (Expression + (PrimaryExpression + (Identifier "foo"))) + (Expression + (PrimaryExpression + (Identifier "bar"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (BooleanOperator + (Token) + (Expression + (PrimaryExpression + (Identifier "baz"))) + (Expression + (PrimaryExpression + (Identifier "buzz")))))))) diff --git a/test/fixtures/python/corpus/boolean-operator.parseB.txt b/test/fixtures/python/corpus/boolean-operator.parseB.txt index 1180fe094..c61238442 100644 --- a/test/fixtures/python/corpus/boolean-operator.parseB.txt +++ b/test/fixtures/python/corpus/boolean-operator.parseB.txt @@ -1,7 +1,23 @@ -(Statements - (Or - (Identifier) - (Identifier)) - (And - (Identifier) - (Identifier))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (BooleanOperator + (Token) + (Expression + (PrimaryExpression + (Identifier "foo"))) + (Expression + (PrimaryExpression + (Identifier "bar"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (BooleanOperator + (Token) + (Expression + (PrimaryExpression + (Identifier "baz"))) + (Expression + (PrimaryExpression + (Identifier "buzz")))))))) diff --git a/test/fixtures/python/corpus/boolean.parseA.txt b/test/fixtures/python/corpus/boolean.parseA.txt index e5b167fee..786da1493 100644 --- a/test/fixtures/python/corpus/boolean.parseA.txt +++ b/test/fixtures/python/corpus/boolean.parseA.txt @@ -1,4 +1,16 @@ -(Statements - (Boolean) - (Boolean) - (Boolean)) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (False "False"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (True "True"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (True "True")))))) diff --git a/test/fixtures/python/corpus/boolean.parseB.txt b/test/fixtures/python/corpus/boolean.parseB.txt index e5b167fee..6365b03f2 100644 --- a/test/fixtures/python/corpus/boolean.parseB.txt +++ b/test/fixtures/python/corpus/boolean.parseB.txt @@ -1,4 +1,16 @@ -(Statements - (Boolean) - (Boolean) - (Boolean)) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (True "True"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (False "False"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (False "False")))))) diff --git a/test/fixtures/python/corpus/break-statement.parseA.txt b/test/fixtures/python/corpus/break-statement.parseA.txt index 58c1a6e14..119338cfc 100644 --- a/test/fixtures/python/corpus/break-statement.parseA.txt +++ b/test/fixtures/python/corpus/break-statement.parseA.txt @@ -1,3 +1,3 @@ -(Statements - (Break - (Empty))) +(Module + (SimpleStatement + (BreakStatement "break"))) diff --git a/test/fixtures/python/corpus/break-statement.parseB.txt b/test/fixtures/python/corpus/break-statement.parseB.txt index fb40ca7bd..4bd47ba15 100644 --- a/test/fixtures/python/corpus/break-statement.parseB.txt +++ b/test/fixtures/python/corpus/break-statement.parseB.txt @@ -1,5 +1,5 @@ -(Statements - (Break - (Empty)) - (Break - (Empty))) +(Module + (SimpleStatement + (BreakStatement "break")) + (SimpleStatement + (BreakStatement "break"))) diff --git a/test/fixtures/python/corpus/call.parseA.txt b/test/fixtures/python/corpus/call.parseA.txt index 523c4a825..91dfc29d5 100644 --- a/test/fixtures/python/corpus/call.parseA.txt +++ b/test/fixtures/python/corpus/call.parseA.txt @@ -1,13 +1,34 @@ -(Statements - (Call - (Identifier) - (Identifier) - (Empty)) - (Call - (Identifier) - (Empty)) - (Call - (Identifier) - (Identifier) - (Identifier) - (Empty))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Call + (PrimaryExpression + (Identifier "foo")) + (ArgumentList + (Expression + (PrimaryExpression + (Identifier "a"))))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Call + (PrimaryExpression + (Identifier "bar")) + (ArgumentList)))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Call + (PrimaryExpression + (Identifier "bazz")) + (ArgumentList + (Expression + (PrimaryExpression + (Identifier "c"))) + (Expression + (PrimaryExpression + (Identifier "d")))))))))) diff --git a/test/fixtures/python/corpus/call.parseB.txt b/test/fixtures/python/corpus/call.parseB.txt index a6ac94e1d..559b15e75 100644 --- a/test/fixtures/python/corpus/call.parseB.txt +++ b/test/fixtures/python/corpus/call.parseB.txt @@ -1,19 +1,48 @@ -(Statements - (Call - (Identifier) - (Empty)) - (Call - (Identifier) - (Identifier) - (Empty)) - (Call - (Identifier) - (Identifier) - (Identifier) - (Empty)) - (Call - (MemberAccess - (Identifier) - (Identifier)) - (Integer) - (Empty))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Call + (PrimaryExpression + (Identifier "foo")) + (ArgumentList)))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Call + (PrimaryExpression + (Identifier "bar")) + (ArgumentList + (Expression + (PrimaryExpression + (Identifier "a"))))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Call + (PrimaryExpression + (Identifier "bazz")) + (ArgumentList + (Expression + (PrimaryExpression + (Identifier "d"))) + (Expression + (PrimaryExpression + (Identifier "c"))))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Call + (PrimaryExpression + (Attribute + (Identifier "exit") + (PrimaryExpression + (Identifier "sys")))) + (ArgumentList + (Expression + (PrimaryExpression + (Integer "1")))))))))) diff --git a/test/fixtures/python/corpus/class-definition.parseA.txt b/test/fixtures/python/corpus/class-definition.parseA.txt index 2e2924313..7f5184a73 100644 --- a/test/fixtures/python/corpus/class-definition.parseA.txt +++ b/test/fixtures/python/corpus/class-definition.parseA.txt @@ -1,41 +1,77 @@ -(Statements - (Class - (Identifier) - (Statements - (Function - (Identifier) - (RequiredParameter - (Identifier)) - (Statements - (Return - (Identifier)))))) - (Class - (Identifier) - (Statements - (NoOp - (Empty)))) - (Class - (Identifier) - (Identifier) - (Statements - (Function - (Identifier) - (RequiredParameter - (Identifier)) - (Statements - (Return - (Empty)))))) - (Class - (Identifier) - (Identifier) - (Statements - (Assignment - (Identifier) - (Identifier) - (Empty)) - (Assignment - (Subscript - (Identifier) - (Identifier)) - (Identifier) - (Empty))))) +(Module + (CompoundStatement + (ClassDefinition + (Block + (CompoundStatement + (FunctionDefinition + (Block + (SimpleStatement + (ReturnStatement + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "c"))))))) + (Identifier "b") + (Parameters + (Parameter + (Identifier "self")))))) + (Identifier "A"))) + (CompoundStatement + (ClassDefinition + (Block + (SimpleStatement + (PassStatement "pass"))) + (ArgumentList) + (Identifier "C"))) + (CompoundStatement + (ClassDefinition + (Block + (CompoundStatement + (FunctionDefinition + (Block + (SimpleStatement + (ReturnStatement))) + (Identifier "method1") + (Parameters + (Parameter + (Identifier "self")))))) + (ArgumentList + (Expression + (PrimaryExpression + (Identifier "method1")))) + (Identifier "B"))) + (CompoundStatement + (ClassDefinition + (Block + (SimpleStatement + (ExpressionStatement + (Assignment + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "f")))) + (Type + (Expression + (PrimaryExpression + (Identifier "str"))))))) + (SimpleStatement + (ExpressionStatement + (Assignment + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "g")))) + (Type + (Expression + (PrimaryExpression + (Subscript + (Expression + (PrimaryExpression + (Identifier "int"))) + (PrimaryExpression + (Identifier "Optional")))))))))) + (ArgumentList + (Expression + (PrimaryExpression + (Identifier "e")))) + (Identifier "D")))) diff --git a/test/fixtures/python/corpus/class-definition.parseB.txt b/test/fixtures/python/corpus/class-definition.parseB.txt index 1ae9a23fa..6e90ca737 100644 --- a/test/fixtures/python/corpus/class-definition.parseB.txt +++ b/test/fixtures/python/corpus/class-definition.parseB.txt @@ -1,36 +1,70 @@ -(Statements - (Class - (Identifier) - (Identifier) - (Statements - (Function - (Identifier) - (RequiredParameter - (Identifier)) - (Statements - (Return - (Empty)))))) - (Class - (Identifier) - (Statements - (Function - (Identifier) - (RequiredParameter - (Identifier)) - (Statements - (Return - (Identifier)))))) - (Class - (Identifier) - (Identifier) - (Statements - (Assignment - (Identifier) - (Identifier) - (Empty)) - (Assignment - (Subscript - (Identifier) - (Identifier)) - (Identifier) - (Empty))))) +(Module + (CompoundStatement + (ClassDefinition + (Block + (CompoundStatement + (FunctionDefinition + (Block + (SimpleStatement + (ReturnStatement))) + (Identifier "method1") + (Parameters + (Parameter + (Identifier "self")))))) + (ArgumentList + (Expression + (PrimaryExpression + (Identifier "method1")))) + (Identifier "D"))) + (CompoundStatement + (ClassDefinition + (Block + (CompoundStatement + (FunctionDefinition + (Block + (SimpleStatement + (ReturnStatement + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "c"))))))) + (Identifier "b") + (Parameters + (Parameter + (Identifier "self")))))) + (Identifier "B"))) + (CompoundStatement + (ClassDefinition + (Block + (SimpleStatement + (ExpressionStatement + (Assignment + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "g")))) + (Type + (Expression + (PrimaryExpression + (Identifier "str"))))))) + (SimpleStatement + (ExpressionStatement + (Assignment + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "h")))) + (Type + (Expression + (PrimaryExpression + (Subscript + (Expression + (PrimaryExpression + (Identifier "int"))) + (PrimaryExpression + (Identifier "Optional")))))))))) + (ArgumentList + (Expression + (PrimaryExpression + (Identifier "e")))) + (Identifier "E")))) diff --git a/test/fixtures/python/corpus/comment.parseA.txt b/test/fixtures/python/corpus/comment.parseA.txt index c5a20a732..8178e5242 100644 --- a/test/fixtures/python/corpus/comment.parseA.txt +++ b/test/fixtures/python/corpus/comment.parseA.txt @@ -1,5 +1 @@ -(Statements - (Context - (Comment) - (Comment) - (Empty))) +(Module) diff --git a/test/fixtures/python/corpus/comment.parseB.txt b/test/fixtures/python/corpus/comment.parseB.txt index 64b336a63..8178e5242 100644 --- a/test/fixtures/python/corpus/comment.parseB.txt +++ b/test/fixtures/python/corpus/comment.parseB.txt @@ -1,6 +1 @@ -(Statements - (Context - (Comment) - (Comment) - (Comment) - (Empty))) +(Module) diff --git a/test/fixtures/python/corpus/comparison-operator.parseA.txt b/test/fixtures/python/corpus/comparison-operator.parseA.txt index 82030142d..602e5e708 100644 --- a/test/fixtures/python/corpus/comparison-operator.parseA.txt +++ b/test/fixtures/python/corpus/comparison-operator.parseA.txt @@ -1,35 +1,81 @@ -(Statements - (LessThan - (Identifier) - (Identifier)) - (LessThanEqual - (Identifier) - (Identifier)) - (Not - (Equal - (Identifier) - (Identifier))) - (GreaterThanEqual - (Identifier) - (Identifier)) - (GreaterThan - (Identifier) - (Identifier)) - (Not - (Equal - (Identifier) - (Identifier))) - (Member - (Identifier) - (Identifier)) - (Equal - (Identifier) - (Identifier)) - (Not - (Member - (Identifier) - (Identifier))) - (Not - (Equal - (Identifier) - (Identifier)))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (ComparisonOperator + (PrimaryExpression + (Identifier "a")) + (PrimaryExpression + (Identifier "b")))))) + (SimpleStatement + (ExpressionStatement + (Expression + (ComparisonOperator + (PrimaryExpression + (Identifier "c")) + (PrimaryExpression + (Identifier "d")))))) + (SimpleStatement + (ExpressionStatement + (Expression + (ComparisonOperator + (PrimaryExpression + (Identifier "e")) + (PrimaryExpression + (Identifier "f")))))) + (SimpleStatement + (ExpressionStatement + (Expression + (ComparisonOperator + (PrimaryExpression + (Identifier "g")) + (PrimaryExpression + (Identifier "h")))))) + (SimpleStatement + (ExpressionStatement + (Expression + (ComparisonOperator + (PrimaryExpression + (Identifier "i")) + (PrimaryExpression + (Identifier "j")))))) + (SimpleStatement + (ExpressionStatement + (Expression + (ComparisonOperator + (PrimaryExpression + (Identifier "k")) + (PrimaryExpression + (Identifier "l")))))) + (SimpleStatement + (ExpressionStatement + (Expression + (ComparisonOperator + (PrimaryExpression + (Identifier "m")) + (PrimaryExpression + (Identifier "n")))))) + (SimpleStatement + (ExpressionStatement + (Expression + (ComparisonOperator + (PrimaryExpression + (Identifier "o")) + (PrimaryExpression + (Identifier "p")))))) + (SimpleStatement + (ExpressionStatement + (Expression + (ComparisonOperator + (PrimaryExpression + (Identifier "q")) + (PrimaryExpression + (Identifier "r")))))) + (SimpleStatement + (ExpressionStatement + (Expression + (ComparisonOperator + (PrimaryExpression + (Identifier "s")) + (PrimaryExpression + (Identifier "t"))))))) diff --git a/test/fixtures/python/corpus/comparison-operator.parseB.txt b/test/fixtures/python/corpus/comparison-operator.parseB.txt index a9647fe00..602e5e708 100644 --- a/test/fixtures/python/corpus/comparison-operator.parseB.txt +++ b/test/fixtures/python/corpus/comparison-operator.parseB.txt @@ -1,35 +1,81 @@ -(Statements - (Not - (Equal - (Identifier) - (Identifier))) - (Not - (Member - (Identifier) - (Identifier))) - (Equal - (Identifier) - (Identifier)) - (Member - (Identifier) - (Identifier)) - (Not - (Equal - (Identifier) - (Identifier))) - (GreaterThan - (Identifier) - (Identifier)) - (GreaterThanEqual - (Identifier) - (Identifier)) - (Not - (Equal - (Identifier) - (Identifier))) - (LessThanEqual - (Identifier) - (Identifier)) - (LessThan - (Identifier) - (Identifier))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (ComparisonOperator + (PrimaryExpression + (Identifier "a")) + (PrimaryExpression + (Identifier "b")))))) + (SimpleStatement + (ExpressionStatement + (Expression + (ComparisonOperator + (PrimaryExpression + (Identifier "c")) + (PrimaryExpression + (Identifier "d")))))) + (SimpleStatement + (ExpressionStatement + (Expression + (ComparisonOperator + (PrimaryExpression + (Identifier "e")) + (PrimaryExpression + (Identifier "f")))))) + (SimpleStatement + (ExpressionStatement + (Expression + (ComparisonOperator + (PrimaryExpression + (Identifier "g")) + (PrimaryExpression + (Identifier "h")))))) + (SimpleStatement + (ExpressionStatement + (Expression + (ComparisonOperator + (PrimaryExpression + (Identifier "i")) + (PrimaryExpression + (Identifier "j")))))) + (SimpleStatement + (ExpressionStatement + (Expression + (ComparisonOperator + (PrimaryExpression + (Identifier "k")) + (PrimaryExpression + (Identifier "l")))))) + (SimpleStatement + (ExpressionStatement + (Expression + (ComparisonOperator + (PrimaryExpression + (Identifier "m")) + (PrimaryExpression + (Identifier "n")))))) + (SimpleStatement + (ExpressionStatement + (Expression + (ComparisonOperator + (PrimaryExpression + (Identifier "o")) + (PrimaryExpression + (Identifier "p")))))) + (SimpleStatement + (ExpressionStatement + (Expression + (ComparisonOperator + (PrimaryExpression + (Identifier "q")) + (PrimaryExpression + (Identifier "r")))))) + (SimpleStatement + (ExpressionStatement + (Expression + (ComparisonOperator + (PrimaryExpression + (Identifier "s")) + (PrimaryExpression + (Identifier "t"))))))) diff --git a/test/fixtures/python/corpus/concatenated-string.parseA.txt b/test/fixtures/python/corpus/concatenated-string.parseA.txt index db1371402..f5160f019 100644 --- a/test/fixtures/python/corpus/concatenated-string.parseA.txt +++ b/test/fixtures/python/corpus/concatenated-string.parseA.txt @@ -1,5 +1,9 @@ -(Statements - (Statements - (TextElement) - (TextElement) - (TextElement))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (ConcatenatedString + (String) + (String) + (String))))))) diff --git a/test/fixtures/python/corpus/concatenated-string.parseB.txt b/test/fixtures/python/corpus/concatenated-string.parseB.txt index b7376182f..f54ab0a37 100644 --- a/test/fixtures/python/corpus/concatenated-string.parseB.txt +++ b/test/fixtures/python/corpus/concatenated-string.parseB.txt @@ -1,6 +1,10 @@ -(Statements - (Statements - (TextElement) - (TextElement) - (TextElement) - (TextElement))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (ConcatenatedString + (String) + (String) + (String) + (String))))))) diff --git a/test/fixtures/python/corpus/conditional-expression.parseA.txt b/test/fixtures/python/corpus/conditional-expression.parseA.txt index 67d8d9b07..1b85b7dfd 100644 --- a/test/fixtures/python/corpus/conditional-expression.parseA.txt +++ b/test/fixtures/python/corpus/conditional-expression.parseA.txt @@ -1,13 +1,36 @@ -(Statements - (If - (Identifier) - (Call - (Identifier) - (Empty)) - (Identifier)) - (Assignment - (Identifier) - (If - (Identifier) - (Identifier) - (Identifier)))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (ConditionalExpression + (Expression + (PrimaryExpression + (Call + (PrimaryExpression + (Identifier "foo")) + (ArgumentList)))) + (Expression + (PrimaryExpression + (Identifier "a"))) + (Expression + (PrimaryExpression + (Identifier "g"))))))) + (SimpleStatement + (ExpressionStatement + (Assignment + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "b")))) + (ExpressionList + (Expression + (ConditionalExpression + (Expression + (PrimaryExpression + (Identifier "c"))) + (Expression + (PrimaryExpression + (Identifier "d"))) + (Expression + (PrimaryExpression + (Identifier "e")))))))))) diff --git a/test/fixtures/python/corpus/conditional-expression.parseB.txt b/test/fixtures/python/corpus/conditional-expression.parseB.txt index 0f588f6e6..fcde7518f 100644 --- a/test/fixtures/python/corpus/conditional-expression.parseB.txt +++ b/test/fixtures/python/corpus/conditional-expression.parseB.txt @@ -1,15 +1,39 @@ -(Statements - (Assignment - (Identifier) - (If - (Identifier) - (Identifier) - (Identifier))) - (If - (Identifier) - (Call - (Identifier) - (Empty)) - (Call - (Identifier) - (Empty)))) +(Module + (SimpleStatement + (ExpressionStatement + (Assignment + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "e")))) + (ExpressionList + (Expression + (ConditionalExpression + (Expression + (PrimaryExpression + (Identifier "d"))) + (Expression + (PrimaryExpression + (Identifier "f"))) + (Expression + (PrimaryExpression + (Identifier "g"))))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (ConditionalExpression + (Expression + (PrimaryExpression + (Call + (PrimaryExpression + (Identifier "foo")) + (ArgumentList)))) + (Expression + (PrimaryExpression + (Identifier "b"))) + (Expression + (PrimaryExpression + (Call + (PrimaryExpression + (Identifier "c")) + (ArgumentList))))))))) diff --git a/test/fixtures/python/corpus/continue-statement.parseA.txt b/test/fixtures/python/corpus/continue-statement.parseA.txt index 00420c427..0c1fcb03e 100644 --- a/test/fixtures/python/corpus/continue-statement.parseA.txt +++ b/test/fixtures/python/corpus/continue-statement.parseA.txt @@ -1,3 +1,3 @@ -(Statements - (Continue - (Empty))) +(Module + (SimpleStatement + (ContinueStatement "continue"))) diff --git a/test/fixtures/python/corpus/continue-statement.parseB.txt b/test/fixtures/python/corpus/continue-statement.parseB.txt index 5f95ddf98..5f70f84f6 100644 --- a/test/fixtures/python/corpus/continue-statement.parseB.txt +++ b/test/fixtures/python/corpus/continue-statement.parseB.txt @@ -1,5 +1,5 @@ -(Statements - (Continue - (Empty)) - (Continue - (Empty))) +(Module + (SimpleStatement + (ContinueStatement "continue")) + (SimpleStatement + (ContinueStatement "continue"))) diff --git a/test/fixtures/python/corpus/decorated-definition.parseA.txt b/test/fixtures/python/corpus/decorated-definition.parseA.txt index 76984a981..504780279 100644 --- a/test/fixtures/python/corpus/decorated-definition.parseA.txt +++ b/test/fixtures/python/corpus/decorated-definition.parseA.txt @@ -1,45 +1,87 @@ -(Statements - (Decorator - (Identifier) - (Class - (Identifier) - (Statements - (Decorator - (Identifier) - (Statements) - (Decorator - (Identifier) - (Integer) - (Decorator - (Identifier) - (Statements - (Integer) - (Integer)) - (Decorator - (Identifier) - (Assignment - (Identifier) - (Boolean)) - (Decorator - (Identifier) - (Statements - (Identifier)) - (Decorator - (Identifier) - (Statements - (Identifier)) - (Decorator - (Identifier) - (Statements - (Integer) - (Assignment - (Identifier) - (Boolean)) - (Statements - (Identifier)) - (Statements - (Identifier))) - (Function - (Identifier) - (Statements - (Identifier)))))))))))))) +(Module + (CompoundStatement + (DecoratedDefinition + (ClassDefinition + (Block + (CompoundStatement + (DecoratedDefinition + (FunctionDefinition + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "g")))))) + (Identifier "f") + (Parameters)) + (Decorator + (ArgumentList) + (DottedName + (Identifier "f"))) + (Decorator + (ArgumentList + (Expression + (PrimaryExpression + (Integer "1")))) + (DottedName + (Identifier "d"))) + (Decorator + (ArgumentList + (Expression + (PrimaryExpression + (Integer "2"))) + (Expression + (PrimaryExpression + (Integer "3")))) + (DottedName + (Identifier "e"))) + (Decorator + (ArgumentList + (KeywordArgument + (Expression + (PrimaryExpression + (True "True"))) + (Identifier "b"))) + (DottedName + (Identifier "a"))) + (Decorator + (ArgumentList + (ListSplat + (Expression + (PrimaryExpression + (Identifier "b"))))) + (DottedName + (Identifier "a"))) + (Decorator + (ArgumentList + (DictionarySplat + (Expression + (PrimaryExpression + (Identifier "c"))))) + (DottedName + (Identifier "a"))) + (Decorator + (ArgumentList + (Expression + (PrimaryExpression + (Integer "1"))) + (KeywordArgument + (Expression + (PrimaryExpression + (True "True"))) + (Identifier "b")) + (ListSplat + (Expression + (PrimaryExpression + (Identifier "b")))) + (DictionarySplat + (Expression + (PrimaryExpression + (Identifier "c"))))) + (DottedName + (Identifier "a")))))) + (Identifier "C")) + (Decorator + (DottedName + (Identifier "a") + (Identifier "b")))))) diff --git a/test/fixtures/python/corpus/decorated-definition.parseB.txt b/test/fixtures/python/corpus/decorated-definition.parseB.txt index 26af752e3..c7cb76b9b 100644 --- a/test/fixtures/python/corpus/decorated-definition.parseB.txt +++ b/test/fixtures/python/corpus/decorated-definition.parseB.txt @@ -1,32 +1,61 @@ -(Statements - (Decorator - (Identifier) - (Class - (Identifier) - (Statements - (Decorator - (Identifier) - (Statements) - (Decorator - (Identifier) - (Statements - (Identifier)) - (Decorator - (Identifier) - (Statements - (Identifier)) - (Decorator - (Identifier) - (Statements - (Integer) - (Assignment - (Identifier) - (Boolean)) - (Statements - (Identifier)) - (Statements - (Identifier))) - (Function - (Identifier) - (Statements - (Identifier))))))))))) +(Module + (CompoundStatement + (DecoratedDefinition + (ClassDefinition + (Block + (CompoundStatement + (DecoratedDefinition + (FunctionDefinition + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "g")))))) + (Identifier "f") + (Parameters)) + (Decorator + (ArgumentList) + (DottedName + (Identifier "f"))) + (Decorator + (ArgumentList + (ListSplat + (Expression + (PrimaryExpression + (Identifier "b"))))) + (DottedName + (Identifier "b"))) + (Decorator + (ArgumentList + (DictionarySplat + (Expression + (PrimaryExpression + (Identifier "c"))))) + (DottedName + (Identifier "c"))) + (Decorator + (ArgumentList + (Expression + (PrimaryExpression + (Integer "2"))) + (KeywordArgument + (Expression + (PrimaryExpression + (True "True"))) + (Identifier "c")) + (ListSplat + (Expression + (PrimaryExpression + (Identifier "a")))) + (DictionarySplat + (Expression + (PrimaryExpression + (Identifier "d"))))) + (DottedName + (Identifier "a")))))) + (Identifier "D")) + (Decorator + (DottedName + (Identifier "a") + (Identifier "b")))))) diff --git a/test/fixtures/python/corpus/delete-statement.parseA.txt b/test/fixtures/python/corpus/delete-statement.parseA.txt index 1a9774e50..16cfd3b49 100644 --- a/test/fixtures/python/corpus/delete-statement.parseA.txt +++ b/test/fixtures/python/corpus/delete-statement.parseA.txt @@ -1,10 +1,20 @@ -(Statements - (Call - (Identifier) - (Subscript - (Identifier) - (Integer)) - (Subscript - (Identifier) - (Integer)) - (Empty))) +(Module + (SimpleStatement + (DeleteStatement + (ExpressionList + (Expression + (PrimaryExpression + (Subscript + (Expression + (PrimaryExpression + (Integer "1"))) + (PrimaryExpression + (Identifier "a"))))) + (Expression + (PrimaryExpression + (Subscript + (Expression + (PrimaryExpression + (Integer "2"))) + (PrimaryExpression + (Identifier "b"))))))))) diff --git a/test/fixtures/python/corpus/delete-statement.parseB.txt b/test/fixtures/python/corpus/delete-statement.parseB.txt index 1a9774e50..10a72d8a0 100644 --- a/test/fixtures/python/corpus/delete-statement.parseB.txt +++ b/test/fixtures/python/corpus/delete-statement.parseB.txt @@ -1,10 +1,20 @@ -(Statements - (Call - (Identifier) - (Subscript - (Identifier) - (Integer)) - (Subscript - (Identifier) - (Integer)) - (Empty))) +(Module + (SimpleStatement + (DeleteStatement + (ExpressionList + (Expression + (PrimaryExpression + (Subscript + (Expression + (PrimaryExpression + (Integer "1"))) + (PrimaryExpression + (Identifier "b"))))) + (Expression + (PrimaryExpression + (Subscript + (Expression + (PrimaryExpression + (Integer "2"))) + (PrimaryExpression + (Identifier "a"))))))))) diff --git a/test/fixtures/python/corpus/dictionary-comprehension.parseA.txt b/test/fixtures/python/corpus/dictionary-comprehension.parseA.txt index 112c24249..0f544841f 100644 --- a/test/fixtures/python/corpus/dictionary-comprehension.parseA.txt +++ b/test/fixtures/python/corpus/dictionary-comprehension.parseA.txt @@ -1,17 +1,43 @@ -(Statements - (Comprehension - (KeyValue - (Identifier) - (Identifier)) - (Statements - (Identifier) - (Identifier))) - (Comprehension - (KeyValue - (Identifier) - (Identifier)) - (Statements - (Statements - (Identifier) - (Identifier)) - (Identifier)))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (DictionaryComprehension + (Pair + (Expression + (PrimaryExpression + (Identifier "d"))) + (Expression + (PrimaryExpression + (Identifier "c")))) + (ForInClause + (Variables + (PrimaryExpression + (Identifier "b"))) + (Expression + (PrimaryExpression + (Identifier "a"))))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (DictionaryComprehension + (Pair + (Expression + (PrimaryExpression + (Identifier "g"))) + (Expression + (PrimaryExpression + (Identifier "d")))) + (ForInClause + (Variables + (PrimaryExpression + (Identifier "e"))) + (Expression + (PrimaryExpression + (Identifier "f")))) + (IfClause + (Expression + (PrimaryExpression + (Identifier "d")))))))))) diff --git a/test/fixtures/python/corpus/dictionary-comprehension.parseB.txt b/test/fixtures/python/corpus/dictionary-comprehension.parseB.txt index 9d95fa0cb..71db51514 100644 --- a/test/fixtures/python/corpus/dictionary-comprehension.parseB.txt +++ b/test/fixtures/python/corpus/dictionary-comprehension.parseB.txt @@ -1,17 +1,43 @@ -(Statements - (Comprehension - (KeyValue - (Identifier) - (Identifier)) - (Statements - (Statements - (Identifier) - (Identifier)) - (Identifier))) - (Comprehension - (KeyValue - (Identifier) - (Integer)) - (Statements - (Identifier) - (Identifier)))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (DictionaryComprehension + (Pair + (Expression + (PrimaryExpression + (Identifier "g"))) + (Expression + (PrimaryExpression + (Identifier "f")))) + (ForInClause + (Variables + (PrimaryExpression + (Identifier "e"))) + (Expression + (PrimaryExpression + (Identifier "d")))) + (IfClause + (Expression + (PrimaryExpression + (Identifier "g"))))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (DictionaryComprehension + (Pair + (Expression + (PrimaryExpression + (Integer "1"))) + (Expression + (PrimaryExpression + (Identifier "c")))) + (ForInClause + (Variables + (PrimaryExpression + (Identifier "b"))) + (Expression + (PrimaryExpression + (Identifier "a")))))))))) diff --git a/test/fixtures/python/corpus/dictionary.parseA.txt b/test/fixtures/python/corpus/dictionary.parseA.txt index bb9afdff0..623b7fe65 100644 --- a/test/fixtures/python/corpus/dictionary.parseA.txt +++ b/test/fixtures/python/corpus/dictionary.parseA.txt @@ -1,13 +1,37 @@ -(Statements - (Hash) - (Hash - (KeyValue - (Identifier) - (Integer))) - (Hash - (KeyValue - (Identifier) - (Identifier)) - (KeyValue - (Identifier) - (Identifier)))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Dictionary))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Dictionary + (Pair + (Expression + (PrimaryExpression + (Integer "1"))) + (Expression + (PrimaryExpression + (Identifier "a"))))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Dictionary + (Pair + (Expression + (PrimaryExpression + (Identifier "b"))) + (Expression + (PrimaryExpression + (Identifier "foo")))) + (Pair + (Expression + (PrimaryExpression + (Identifier "c"))) + (Expression + (PrimaryExpression + (Identifier "bar")))))))))) diff --git a/test/fixtures/python/corpus/dictionary.parseB.txt b/test/fixtures/python/corpus/dictionary.parseB.txt index ab1a5246e..ac8b011e1 100644 --- a/test/fixtures/python/corpus/dictionary.parseB.txt +++ b/test/fixtures/python/corpus/dictionary.parseB.txt @@ -1,17 +1,43 @@ -(Statements - (Hash - (KeyValue - (Identifier) - (Integer))) - (Hash) - (Assignment - (Identifier) - (Hash - (Context - (Comment) - (KeyValue - (Identifier) - (Identifier))) - (KeyValue - (Identifier) - (Identifier))))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Dictionary + (Pair + (Expression + (PrimaryExpression + (Integer "2"))) + (Expression + (PrimaryExpression + (Identifier "b"))))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Dictionary))))) + (SimpleStatement + (ExpressionStatement + (Assignment + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "a")))) + (ExpressionList + (Expression + (PrimaryExpression + (Dictionary + (Pair + (Expression + (PrimaryExpression + (Identifier "d"))) + (Expression + (PrimaryExpression + (Identifier "bar")))) + (Pair + (Expression + (PrimaryExpression + (Identifier "e"))) + (Expression + (PrimaryExpression + (Identifier "foo")))))))))))) diff --git a/test/fixtures/python/corpus/dotted-name.parseA.txt b/test/fixtures/python/corpus/dotted-name.parseA.txt index 96ac53b2b..628e568b5 100644 --- a/test/fixtures/python/corpus/dotted-name.parseA.txt +++ b/test/fixtures/python/corpus/dotted-name.parseA.txt @@ -1,9 +1,20 @@ -(Statements - (MemberAccess - (Identifier) - (Identifier)) - (MemberAccess - (MemberAccess - (Identifier) - (Identifier)) - (Identifier))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Attribute + (Identifier "b") + (PrimaryExpression + (Identifier "a"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Attribute + (Identifier "f") + (PrimaryExpression + (Attribute + (Identifier "e") + (PrimaryExpression + (Identifier "d")))))))))) diff --git a/test/fixtures/python/corpus/dotted-name.parseB.txt b/test/fixtures/python/corpus/dotted-name.parseB.txt index 8e6cef600..b4e1bfda7 100644 --- a/test/fixtures/python/corpus/dotted-name.parseB.txt +++ b/test/fixtures/python/corpus/dotted-name.parseB.txt @@ -1,9 +1,20 @@ -(Statements - (MemberAccess - (MemberAccess - (Identifier) - (Identifier)) - (Identifier)) - (MemberAccess - (Identifier) - (Identifier))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Attribute + (Identifier "c") + (PrimaryExpression + (Attribute + (Identifier "b") + (PrimaryExpression + (Identifier "a"))))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Attribute + (Identifier "e") + (PrimaryExpression + (Identifier "d")))))))) diff --git a/test/fixtures/python/corpus/ellipsis.parseA.txt b/test/fixtures/python/corpus/ellipsis.parseA.txt index 76b3ebba6..9156d05bb 100644 --- a/test/fixtures/python/corpus/ellipsis.parseA.txt +++ b/test/fixtures/python/corpus/ellipsis.parseA.txt @@ -1,3 +1,11 @@ -(Statements - (Ellipsis) - (Ellipsis)) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Ellipsis "..."))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Ellipsis "...")))))) diff --git a/test/fixtures/python/corpus/ellipsis.parseB.txt b/test/fixtures/python/corpus/ellipsis.parseB.txt index e7209aaaa..3b1bd90b0 100644 --- a/test/fixtures/python/corpus/ellipsis.parseB.txt +++ b/test/fixtures/python/corpus/ellipsis.parseB.txt @@ -1,2 +1,6 @@ -(Statements - (Ellipsis)) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Ellipsis "...")))))) diff --git a/test/fixtures/python/corpus/exec-statement.parseA.txt b/test/fixtures/python/corpus/exec-statement.parseA.txt index f4c14c4d1..f1c05aafd 100644 --- a/test/fixtures/python/corpus/exec-statement.parseA.txt +++ b/test/fixtures/python/corpus/exec-statement.parseA.txt @@ -1,16 +1,19 @@ -(Statements - (Call - (Identifier) - (TextElement) - (Empty)) - (Call - (Identifier) - (TextElement) - (Null) - (Empty)) - (Call - (Identifier) - (TextElement) - (Identifier) - (Identifier) - (Empty))) +(Module + (SimpleStatement + (ExecStatement + (String))) + (SimpleStatement + (ExecStatement + (String) + (Expression + (PrimaryExpression + (None "None"))))) + (SimpleStatement + (ExecStatement + (String) + (Expression + (PrimaryExpression + (Identifier "a"))) + (Expression + (PrimaryExpression + (Identifier "b")))))) diff --git a/test/fixtures/python/corpus/exec-statement.parseB.txt b/test/fixtures/python/corpus/exec-statement.parseB.txt index 588cb9ec0..81aec8f4a 100644 --- a/test/fixtures/python/corpus/exec-statement.parseB.txt +++ b/test/fixtures/python/corpus/exec-statement.parseB.txt @@ -1,16 +1,19 @@ -(Statements - (Call - (Identifier) - (TextElement) - (Identifier) - (Empty)) - (Call - (Identifier) - (TextElement) - (Identifier) - (Identifier) - (Empty)) - (Call - (Identifier) - (TextElement) - (Empty))) +(Module + (SimpleStatement + (ExecStatement + (String) + (Expression + (PrimaryExpression + (Identifier "d"))))) + (SimpleStatement + (ExecStatement + (String) + (Expression + (PrimaryExpression + (Identifier "b"))) + (Expression + (PrimaryExpression + (Identifier "c"))))) + (SimpleStatement + (ExecStatement + (String)))) diff --git a/test/fixtures/python/corpus/expression-statement.parseA.txt b/test/fixtures/python/corpus/expression-statement.parseA.txt index 847b5a074..9db863375 100644 --- a/test/fixtures/python/corpus/expression-statement.parseA.txt +++ b/test/fixtures/python/corpus/expression-statement.parseA.txt @@ -1,13 +1,38 @@ -(Statements - (Identifier) - (Plus - (Identifier) - (Identifier)) - (Statements - (Integer) - (Integer) - (Integer)) - (Statements - (Integer) - (Integer) - (Integer))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "a"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "b")) + (PrimaryExpression + (Identifier "c"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "1"))) + (Expression + (PrimaryExpression + (Integer "2"))) + (Expression + (PrimaryExpression + (Integer "3"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "1"))) + (Expression + (PrimaryExpression + (Integer "2"))) + (Expression + (PrimaryExpression + (Integer "3")))))) diff --git a/test/fixtures/python/corpus/expression-statement.parseB.txt b/test/fixtures/python/corpus/expression-statement.parseB.txt index 61e8ba8f1..479bf8ea5 100644 --- a/test/fixtures/python/corpus/expression-statement.parseB.txt +++ b/test/fixtures/python/corpus/expression-statement.parseB.txt @@ -1,13 +1,38 @@ -(Statements - (Statements - (Integer) - (Integer) - (Integer)) - (Identifier) - (Statements - (Integer) - (Integer) - (Integer)) - (Plus - (Identifier) - (Identifier))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "1"))) + (Expression + (PrimaryExpression + (Integer "2"))) + (Expression + (PrimaryExpression + (Integer "3"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "b"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "3"))) + (Expression + (PrimaryExpression + (Integer "1"))) + (Expression + (PrimaryExpression + (Integer "2"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "a")) + (PrimaryExpression + (Identifier "c")))))))) diff --git a/test/fixtures/python/corpus/float.parseA.txt b/test/fixtures/python/corpus/float.parseA.txt index c3cd2858d..85944d574 100644 --- a/test/fixtures/python/corpus/float.parseA.txt +++ b/test/fixtures/python/corpus/float.parseA.txt @@ -1,12 +1,57 @@ -(Statements - (Negate - (Float)) - (Float) - (Float) - (Float) - (Float) - (Float) - (Float) - (Float) - (Float) - (Float)) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (UnaryOperator + (Token) + (PrimaryExpression + (Float ".6_6"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (UnaryOperator + (Token) + (PrimaryExpression + (Float ".1_1"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Float "123.4123"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Float "123.123J"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Float "1_1.3_1"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Float "1_1."))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Float "1e+3_4j"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Float ".3e1_4"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Float "1_0.l"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Float ".1l")))))) diff --git a/test/fixtures/python/corpus/float.parseB.txt b/test/fixtures/python/corpus/float.parseB.txt index c3cd2858d..a4b33e7af 100644 --- a/test/fixtures/python/corpus/float.parseB.txt +++ b/test/fixtures/python/corpus/float.parseB.txt @@ -1,12 +1,57 @@ -(Statements - (Negate - (Float)) - (Float) - (Float) - (Float) - (Float) - (Float) - (Float) - (Float) - (Float) - (Float)) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (UnaryOperator + (Token) + (PrimaryExpression + (Float ".7_8"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (UnaryOperator + (Token) + (PrimaryExpression + (Float ".2_2"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Float "123.2345"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Float "123.321J"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Float "2_4.8_0"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Float "2_0."))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Float "8e+2_3j"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Float ".8e2_7"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Float "2_1.l"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Float ".2l")))))) diff --git a/test/fixtures/python/corpus/for-statement.parseA.txt b/test/fixtures/python/corpus/for-statement.parseA.txt index 98ae9a0fe..5d24fc2d8 100644 --- a/test/fixtures/python/corpus/for-statement.parseA.txt +++ b/test/fixtures/python/corpus/for-statement.parseA.txt @@ -1,37 +1,75 @@ -(Statements - (Else - (ForEach - (Statements - (Identifier) - (Identifier)) - (Identifier) - (Statements - (Call - (Identifier) - (Identifier) - (Empty)) - (ForEach - (Statements - (Identifier) - (Identifier)) - (Identifier) - (Statements - (Call - (Identifier) - (Identifier) - (Empty)))))) - (Call - (Identifier) - (Identifier) - (Empty))) - (ForEach - (Identifier) - (Array - (Tuple - (Integer)) - (Tuple - (Integer)) - (Tuple - (Integer))) - (Statements - (Identifier)))) +(Module + (CompoundStatement + (ForStatement + (ElseClause + (Block + (SimpleStatement + (PrintStatement + (Expression + (PrimaryExpression + (Identifier "x"))))))) + (Block + (SimpleStatement + (PrintStatement + (Expression + (PrimaryExpression + (Identifier "line"))))) + (CompoundStatement + (ForStatement + (Block + (SimpleStatement + (PrintStatement + (Expression + (PrimaryExpression + (Identifier "character")))))) + (Variables + (PrimaryExpression + (Identifier "character")) + (PrimaryExpression + (Identifier "j"))) + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "line"))))))) + (Variables + (PrimaryExpression + (Identifier "line")) + (PrimaryExpression + (Identifier "i"))) + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "lines")))))) + (CompoundStatement + (ForStatement + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "x")))))) + (Variables + (PrimaryExpression + (Identifier "x"))) + (ExpressionList + (Expression + (PrimaryExpression + (List + (Expression + (PrimaryExpression + (Tuple + (Expression + (PrimaryExpression + (Integer "1")))))) + (Expression + (PrimaryExpression + (Tuple + (Expression + (PrimaryExpression + (Integer "2")))))) + (Expression + (PrimaryExpression + (Tuple + (Expression + (PrimaryExpression + (Integer "3"))))))))))))) diff --git a/test/fixtures/python/corpus/for-statement.parseB.txt b/test/fixtures/python/corpus/for-statement.parseB.txt index ccd3a7212..ebaf97288 100644 --- a/test/fixtures/python/corpus/for-statement.parseB.txt +++ b/test/fixtures/python/corpus/for-statement.parseB.txt @@ -1,37 +1,75 @@ -(Statements - (ForEach - (Identifier) - (Array - (Tuple - (Integer)) - (Tuple - (Integer)) - (Tuple - (Integer))) - (Statements - (Identifier))) - (Else - (ForEach - (Statements - (Identifier) - (Identifier)) - (Identifier) - (Statements - (Call - (Identifier) - (Identifier) - (Empty)) - (ForEach - (Statements - (Identifier) - (Identifier)) - (Identifier) - (Statements - (Call - (Identifier) - (Identifier) - (Empty)))))) - (Call - (Identifier) - (Identifier) - (Empty)))) +(Module + (CompoundStatement + (ForStatement + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "y")))))) + (Variables + (PrimaryExpression + (Identifier "y"))) + (ExpressionList + (Expression + (PrimaryExpression + (List + (Expression + (PrimaryExpression + (Tuple + (Expression + (PrimaryExpression + (Integer "1")))))) + (Expression + (PrimaryExpression + (Tuple + (Expression + (PrimaryExpression + (Integer "2")))))) + (Expression + (PrimaryExpression + (Tuple + (Expression + (PrimaryExpression + (Integer "3")))))))))))) + (CompoundStatement + (ForStatement + (ElseClause + (Block + (SimpleStatement + (PrintStatement + (Expression + (PrimaryExpression + (Identifier "y"))))))) + (Block + (SimpleStatement + (PrintStatement + (Expression + (PrimaryExpression + (Identifier "line"))))) + (CompoundStatement + (ForStatement + (Block + (SimpleStatement + (PrintStatement + (Expression + (PrimaryExpression + (Identifier "character")))))) + (Variables + (PrimaryExpression + (Identifier "character")) + (PrimaryExpression + (Identifier "i"))) + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "line"))))))) + (Variables + (PrimaryExpression + (Identifier "line")) + (PrimaryExpression + (Identifier "j"))) + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "lines"))))))) diff --git a/test/fixtures/python/corpus/function-definition.parseA.txt b/test/fixtures/python/corpus/function-definition.parseA.txt index d50208c9c..4fffb0c0b 100644 --- a/test/fixtures/python/corpus/function-definition.parseA.txt +++ b/test/fixtures/python/corpus/function-definition.parseA.txt @@ -1,37 +1,81 @@ -(Statements - (Function - (Identifier) - (Statements - (Identifier))) - (Function - (Identifier) - (RequiredParameter - (Identifier)) - (Statements - (Identifier))) - (Function - (Identifier) - (RequiredParameter - (Identifier)) - (Statements - (Identifier)) - (Statements - (Identifier))) - (Function - (Identifier) - (Assignment - (Identifier) - (Identifier)) - (Statements - (Identifier))) - (Function - (Identifier) - (Annotation - (Assignment - (Identifier) - (TextElement)) - (Identifier)) - (Statements - (Identifier)) - (Statements - (Identifier)))) +(Module + (CompoundStatement + (FunctionDefinition + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "b")))))) + (Identifier "a") + (Parameters))) + (CompoundStatement + (FunctionDefinition + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "e")))))) + (Identifier "c") + (Parameters + (Parameter + (Identifier "d"))))) + (CompoundStatement + (FunctionDefinition + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "i")))))) + (Identifier "g") + (Parameters + (Parameter + (Identifier "g")) + (Parameter + (ListSplat + (Expression + (PrimaryExpression + (Identifier "h")))))))) + (CompoundStatement + (FunctionDefinition + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "i")))))) + (Identifier "h") + (Parameters + (Parameter + (DefaultParameter + (Expression + (PrimaryExpression + (Identifier "j"))) + (Identifier "i")))))) + (CompoundStatement + (FunctionDefinition + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "j")))))) + (Identifier "i") + (Parameters + (Parameter + (TypedDefaultParameter + (Expression + (PrimaryExpression + (String))) + (Identifier "j") + (Type + (Expression + (PrimaryExpression + (Identifier "str")))))) + (Parameter + (DictionarySplat + (Expression + (PrimaryExpression + (Identifier "c"))))))))) diff --git a/test/fixtures/python/corpus/function-definition.parseB.txt b/test/fixtures/python/corpus/function-definition.parseB.txt index dfc32b6c1..5d9760b5c 100644 --- a/test/fixtures/python/corpus/function-definition.parseB.txt +++ b/test/fixtures/python/corpus/function-definition.parseB.txt @@ -1,30 +1,65 @@ -(Statements - (Function - (Identifier) - (RequiredParameter - (Identifier)) - (Statements - (Identifier)) - (Statements - (Identifier))) - (Function - (Identifier) - (Statements - (Identifier))) - (Function - (Identifier) - (RequiredParameter - (Identifier)) - (Statements - (Identifier))) - (Function - (Identifier) - (Annotation - (Assignment - (Identifier) - (Integer)) - (Identifier)) - (Statements - (Identifier)) - (Statements - (Identifier)))) +(Module + (CompoundStatement + (FunctionDefinition + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "j")))))) + (Identifier "g") + (Parameters + (Parameter + (Identifier "i")) + (Parameter + (ListSplat + (Expression + (PrimaryExpression + (Identifier "j")))))))) + (CompoundStatement + (FunctionDefinition + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "b")))))) + (Identifier "c") + (Parameters))) + (CompoundStatement + (FunctionDefinition + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "a")))))) + (Identifier "d") + (Parameters + (Parameter + (Identifier "e"))))) + (CompoundStatement + (FunctionDefinition + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "j")))))) + (Identifier "i") + (Parameters + (Parameter + (TypedDefaultParameter + (Expression + (PrimaryExpression + (Integer "1"))) + (Identifier "j") + (Type + (Expression + (PrimaryExpression + (Identifier "int")))))) + (Parameter + (DictionarySplat + (Expression + (PrimaryExpression + (Identifier "d"))))))))) diff --git a/test/fixtures/python/corpus/future_import_statement.parseA.txt b/test/fixtures/python/corpus/future_import_statement.parseA.txt index 5acbd33bf..0e5d90690 100644 --- a/test/fixtures/python/corpus/future_import_statement.parseA.txt +++ b/test/fixtures/python/corpus/future_import_statement.parseA.txt @@ -1,16 +1,17 @@ -(Statements - (FutureImport - (Alias - (Identifier) - (Identifier))) - (FutureImport - (Alias - (Identifier) - (Identifier)) - (Alias - (Identifier) - (Identifier))) - (FutureImport - (Alias - (Identifier) - (Identifier)))) +(Module + (SimpleStatement + (FutureImportStatement + (DottedName + (Identifier "print_function")))) + (SimpleStatement + (FutureImportStatement + (DottedName + (Identifier "unicode_literals")) + (DottedName + (Identifier "division")))) + (SimpleStatement + (FutureImportStatement + (AliasedImport + (Identifier "pf") + (DottedName + (Identifier "print_function")))))) diff --git a/test/fixtures/python/corpus/future_import_statement.parseB.txt b/test/fixtures/python/corpus/future_import_statement.parseB.txt index 5acbd33bf..61188743e 100644 --- a/test/fixtures/python/corpus/future_import_statement.parseB.txt +++ b/test/fixtures/python/corpus/future_import_statement.parseB.txt @@ -1,16 +1,17 @@ -(Statements - (FutureImport - (Alias - (Identifier) - (Identifier))) - (FutureImport - (Alias - (Identifier) - (Identifier)) - (Alias - (Identifier) - (Identifier))) - (FutureImport - (Alias - (Identifier) - (Identifier)))) +(Module + (SimpleStatement + (FutureImportStatement + (DottedName + (Identifier "division")))) + (SimpleStatement + (FutureImportStatement + (DottedName + (Identifier "unicode_literals")) + (DottedName + (Identifier "print_function")))) + (SimpleStatement + (FutureImportStatement + (AliasedImport + (Identifier "g") + (DottedName + (Identifier "generators")))))) diff --git a/test/fixtures/python/corpus/generator-expression.parseA.txt b/test/fixtures/python/corpus/generator-expression.parseA.txt index ead6841ee..41b4c9c84 100644 --- a/test/fixtures/python/corpus/generator-expression.parseA.txt +++ b/test/fixtures/python/corpus/generator-expression.parseA.txt @@ -1,11 +1,31 @@ -(Statements - (Comprehension - (Identifier) - (Statements - (Identifier) - (Identifier))) - (Comprehension - (Identifier) - (Statements - (Identifier) - (Identifier)))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (GeneratorExpression + (Expression + (PrimaryExpression + (Identifier "c"))) + (ForInClause + (Variables + (PrimaryExpression + (Identifier "b"))) + (Expression + (PrimaryExpression + (Identifier "a"))))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (GeneratorExpression + (Expression + (PrimaryExpression + (Identifier "d"))) + (ForInClause + (Variables + (PrimaryExpression + (Identifier "e"))) + (Expression + (PrimaryExpression + (Identifier "f")))))))))) diff --git a/test/fixtures/python/corpus/generator-expression.parseB.txt b/test/fixtures/python/corpus/generator-expression.parseB.txt index 9afbdfa93..052eeba0a 100644 --- a/test/fixtures/python/corpus/generator-expression.parseB.txt +++ b/test/fixtures/python/corpus/generator-expression.parseB.txt @@ -1,13 +1,36 @@ -(Statements - (Comprehension - (Identifier) - (Statements - (Identifier) - (Identifier))) - (Comprehension - (Plus - (Identifier) - (Integer)) - (Statements - (Identifier) - (Identifier)))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (GeneratorExpression + (Expression + (PrimaryExpression + (Identifier "f"))) + (ForInClause + (Variables + (PrimaryExpression + (Identifier "e"))) + (Expression + (PrimaryExpression + (Identifier "d"))))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (GeneratorExpression + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "c")) + (PrimaryExpression + (Integer "1"))))) + (ForInClause + (Variables + (PrimaryExpression + (Identifier "b"))) + (Expression + (PrimaryExpression + (Identifier "a")))))))))) diff --git a/test/fixtures/python/corpus/global-statement.parseA.txt b/test/fixtures/python/corpus/global-statement.parseA.txt index e1dc96503..ac3699274 100644 --- a/test/fixtures/python/corpus/global-statement.parseA.txt +++ b/test/fixtures/python/corpus/global-statement.parseA.txt @@ -1,10 +1,8 @@ -(Statements - (Call - (Identifier) - (Identifier) - (Empty)) - (Call - (Identifier) - (Identifier) - (Identifier) - (Empty))) +(Module + (SimpleStatement + (GlobalStatement + (Identifier "a"))) + (SimpleStatement + (GlobalStatement + (Identifier "a") + (Identifier "b")))) diff --git a/test/fixtures/python/corpus/global-statement.parseB.txt b/test/fixtures/python/corpus/global-statement.parseB.txt index 3f92988c5..e1e38a689 100644 --- a/test/fixtures/python/corpus/global-statement.parseB.txt +++ b/test/fixtures/python/corpus/global-statement.parseB.txt @@ -1,10 +1,8 @@ -(Statements - (Call - (Identifier) - (Identifier) - (Identifier) - (Empty)) - (Call - (Identifier) - (Identifier) - (Empty))) +(Module + (SimpleStatement + (GlobalStatement + (Identifier "b") + (Identifier "a"))) + (SimpleStatement + (GlobalStatement + (Identifier "c")))) diff --git a/test/fixtures/python/corpus/identifier.parseA.txt b/test/fixtures/python/corpus/identifier.parseA.txt index 5f0ab64c1..044e916ca 100644 --- a/test/fixtures/python/corpus/identifier.parseA.txt +++ b/test/fixtures/python/corpus/identifier.parseA.txt @@ -1,2 +1,6 @@ -(Statements - (Identifier)) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "a")))))) diff --git a/test/fixtures/python/corpus/identifier.parseB.txt b/test/fixtures/python/corpus/identifier.parseB.txt index 8aac190e1..ed813f703 100644 --- a/test/fixtures/python/corpus/identifier.parseB.txt +++ b/test/fixtures/python/corpus/identifier.parseB.txt @@ -1,3 +1,11 @@ -(Statements - (Identifier) - (Identifier)) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "aa"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "print")))))) diff --git a/test/fixtures/python/corpus/if-statement.parseA.txt b/test/fixtures/python/corpus/if-statement.parseA.txt index d66f56a4f..c567e7119 100644 --- a/test/fixtures/python/corpus/if-statement.parseA.txt +++ b/test/fixtures/python/corpus/if-statement.parseA.txt @@ -1,16 +1,44 @@ -(Statements - (If - (Identifier) - (Statements - (Identifier) - (Identifier)) - (Statements - (If - (Identifier) - (Statements - (Identifier) - (Identifier)) - (Statements)) - (Statements - (Identifier) - (Identifier))))) +(Module + (CompoundStatement + (IfStatement + (ElifClause + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "a"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "b")))))) + (Expression + (PrimaryExpression + (Identifier "d")))) + (ElseClause + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "x"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "y"))))))) + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "b"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "c")))))) + (Expression + (PrimaryExpression + (Identifier "a")))))) diff --git a/test/fixtures/python/corpus/if-statement.parseB.txt b/test/fixtures/python/corpus/if-statement.parseB.txt index f50e9e432..b035212a4 100644 --- a/test/fixtures/python/corpus/if-statement.parseB.txt +++ b/test/fixtures/python/corpus/if-statement.parseB.txt @@ -1,7 +1,17 @@ -(Statements - (If - (Identifier) - (Statements - (Identifier) - (Identifier)) - (Statements))) +(Module + (CompoundStatement + (IfStatement + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "a"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "b")))))) + (Expression + (PrimaryExpression + (Identifier "c")))))) diff --git a/test/fixtures/python/corpus/import-from-statement.parseA.txt b/test/fixtures/python/corpus/import-from-statement.parseA.txt index 48056679d..1b8c3369a 100644 --- a/test/fixtures/python/corpus/import-from-statement.parseA.txt +++ b/test/fixtures/python/corpus/import-from-statement.parseA.txt @@ -1,21 +1,33 @@ -(Statements - (Import - (Alias - (Identifier) - (Identifier))) - (Import - (Alias - (Identifier) - (Identifier)) - (Alias - (Identifier) - (Identifier))) - (Import) - (Import - (Alias - (Identifier) - (Identifier))) - (Import - (Alias - (Identifier) - (Identifier)))) +(Module + (SimpleStatement + (ImportFromStatement + (DottedName + (Identifier "b")) + (DottedName + (Identifier "a")))) + (SimpleStatement + (ImportFromStatement + (DottedName + (Identifier "b")) + (DottedName + (Identifier "c")) + (DottedName + (Identifier "a")))) + (SimpleStatement + (ImportFromStatement + (DottedName + (Identifier "a")) + (WildcardImport "*"))) + (SimpleStatement + (ImportFromStatement + (DottedName + (Identifier "c")) + (DottedName + (Identifier "a") + (Identifier "b")))) + (SimpleStatement + (ImportFromStatement + (DottedName + (Identifier "b")) + (RelativeImport + (ImportPrefix "."))))) diff --git a/test/fixtures/python/corpus/import-from-statement.parseB.txt b/test/fixtures/python/corpus/import-from-statement.parseB.txt index 68623b663..223a78a88 100644 --- a/test/fixtures/python/corpus/import-from-statement.parseB.txt +++ b/test/fixtures/python/corpus/import-from-statement.parseB.txt @@ -1,28 +1,45 @@ -(Statements - (Import - (Alias - (Identifier) - (Identifier))) - (Import - (Alias - (Identifier) - (Identifier)) - (Alias - (Identifier) - (Identifier))) - (Import) - (Import - (Alias - (Identifier) - (Identifier)) - (Alias - (Identifier) - (Identifier))) - (Import - (Alias - (Identifier) - (Identifier))) - (Import - (Alias - (Identifier) - (Identifier)))) +(Module + (SimpleStatement + (ImportFromStatement + (DottedName + (Identifier "a")) + (DottedName + (Identifier "b")))) + (SimpleStatement + (ImportFromStatement + (DottedName + (Identifier "c")) + (DottedName + (Identifier "a")) + (DottedName + (Identifier "b")))) + (SimpleStatement + (ImportFromStatement + (DottedName + (Identifier "b")) + (WildcardImport "*"))) + (SimpleStatement + (ImportFromStatement + (AliasedImport + (Identifier "x") + (DottedName + (Identifier "a"))) + (AliasedImport + (Identifier "y") + (DottedName + (Identifier "b"))) + (DottedName + (Identifier "b")))) + (SimpleStatement + (ImportFromStatement + (DottedName + (Identifier "d")) + (DottedName + (Identifier "b") + (Identifier "c")))) + (SimpleStatement + (ImportFromStatement + (DottedName + (Identifier "d")) + (RelativeImport + (ImportPrefix "."))))) diff --git a/test/fixtures/python/corpus/import-statement.parseA.txt b/test/fixtures/python/corpus/import-statement.parseA.txt index bd21ce77b..96ccdd5b2 100644 --- a/test/fixtures/python/corpus/import-statement.parseA.txt +++ b/test/fixtures/python/corpus/import-statement.parseA.txt @@ -1,15 +1,24 @@ -(Statements - (Statements - (QualifiedImport - (Identifier)) - (QualifiedAliasedImport - (Identifier))) - (Statements - (QualifiedAliasedImport - (Identifier)) - (QualifiedImport - (Identifier))) - (QualifiedImport - (Identifier) - (Identifier) - (Identifier))) +(Module + (SimpleStatement + (ImportStatement + (DottedName + (Identifier "a")) + (AliasedImport + (Identifier "c") + (DottedName + (Identifier "b"))))) + (SimpleStatement + (ImportStatement + (AliasedImport + (Identifier "d") + (DottedName + (Identifier "b") + (Identifier "c"))) + (DottedName + (Identifier "e")))) + (SimpleStatement + (ImportStatement + (DottedName + (Identifier "a") + (Identifier "b") + (Identifier "c"))))) diff --git a/test/fixtures/python/corpus/import-statement.parseB.txt b/test/fixtures/python/corpus/import-statement.parseB.txt index 529ee2b2b..b04b08193 100644 --- a/test/fixtures/python/corpus/import-statement.parseB.txt +++ b/test/fixtures/python/corpus/import-statement.parseB.txt @@ -1,12 +1,20 @@ -(Statements - (Statements - (QualifiedImport - (Identifier)) - (QualifiedImport - (Identifier))) - (QualifiedAliasedImport - (Identifier)) - (QualifiedImport - (Identifier) - (Identifier) - (Identifier))) +(Module + (SimpleStatement + (ImportStatement + (DottedName + (Identifier "b")) + (DottedName + (Identifier "a")))) + (SimpleStatement + (ImportStatement + (AliasedImport + (Identifier "e") + (DottedName + (Identifier "a") + (Identifier "c"))))) + (SimpleStatement + (ImportStatement + (DottedName + (Identifier "b") + (Identifier "c") + (Identifier "d"))))) diff --git a/test/fixtures/python/corpus/integer.parseA.txt b/test/fixtures/python/corpus/integer.parseA.txt index d8be2686b..a3b53b929 100644 --- a/test/fixtures/python/corpus/integer.parseA.txt +++ b/test/fixtures/python/corpus/integer.parseA.txt @@ -1,16 +1,72 @@ -(Statements - (Negate - (Integer)) - (Integer) - (Integer) - (Integer) - (Negate - (Integer)) - (Integer) - (Integer) - (Integer) - (Integer) - (Integer) - (Integer) - (Integer) - (Integer)) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (UnaryOperator + (Token) + (PrimaryExpression + (Integer "1"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "0xDEAD"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "0XDEAD"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "1j"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (UnaryOperator + (Token) + (PrimaryExpression + (Integer "1j"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "0o123"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "0O123"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "0b001"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "0B001"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "1_1"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "0B1_1"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "0O1_1"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "0L")))))) diff --git a/test/fixtures/python/corpus/integer.parseB.txt b/test/fixtures/python/corpus/integer.parseB.txt index d8be2686b..e427c43e5 100644 --- a/test/fixtures/python/corpus/integer.parseB.txt +++ b/test/fixtures/python/corpus/integer.parseB.txt @@ -1,16 +1,72 @@ -(Statements - (Negate - (Integer)) - (Integer) - (Integer) - (Integer) - (Negate - (Integer)) - (Integer) - (Integer) - (Integer) - (Integer) - (Integer) - (Integer) - (Integer) - (Integer)) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (UnaryOperator + (Token) + (PrimaryExpression + (Integer "2"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "0xDAD"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "0XDAD"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "2j"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (UnaryOperator + (Token) + (PrimaryExpression + (Integer "2j"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "0o312"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "0O312"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "0b101"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "0B101"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "2_2"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "0B1_1_1"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "0O2_3"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Integer "1L")))))) diff --git a/test/fixtures/python/corpus/keyword-identifier.parseA.txt b/test/fixtures/python/corpus/keyword-identifier.parseA.txt index 8aac190e1..142d59cc2 100644 --- a/test/fixtures/python/corpus/keyword-identifier.parseA.txt +++ b/test/fixtures/python/corpus/keyword-identifier.parseA.txt @@ -1,3 +1,11 @@ -(Statements - (Identifier) - (Identifier)) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "print"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "exec")))))) diff --git a/test/fixtures/python/corpus/keyword-identifier.parseB.txt b/test/fixtures/python/corpus/keyword-identifier.parseB.txt index 8aac190e1..f98c149fa 100644 --- a/test/fixtures/python/corpus/keyword-identifier.parseB.txt +++ b/test/fixtures/python/corpus/keyword-identifier.parseB.txt @@ -1,3 +1,11 @@ -(Statements - (Identifier) - (Identifier)) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "exec"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "print")))))) diff --git a/test/fixtures/python/corpus/lambda.parseA.txt b/test/fixtures/python/corpus/lambda.parseA.txt index 4cd515711..deaf73949 100644 --- a/test/fixtures/python/corpus/lambda.parseA.txt +++ b/test/fixtures/python/corpus/lambda.parseA.txt @@ -1,7 +1,13 @@ -(Statements - (Function - (Empty) - (Statements - (Plus - (Integer) - (Integer))))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (Lambda + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Integer "1")) + (PrimaryExpression + (Integer "1")))))))))) diff --git a/test/fixtures/python/corpus/lambda.parseB.txt b/test/fixtures/python/corpus/lambda.parseB.txt index fb0cf2df5..38ccbbfe7 100644 --- a/test/fixtures/python/corpus/lambda.parseB.txt +++ b/test/fixtures/python/corpus/lambda.parseB.txt @@ -1,8 +1,16 @@ -(Statements - (Function - (Empty) - (Identifier) - (Statements - (Plus - (Identifier) - (Integer))))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (Lambda + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "a")) + (PrimaryExpression + (Integer "1"))))) + (LambdaParameters + (Parameter + (Identifier "a")))))))) diff --git a/test/fixtures/python/corpus/list-comprehension.parseA.txt b/test/fixtures/python/corpus/list-comprehension.parseA.txt index 669c723df..6e9a49c0e 100644 --- a/test/fixtures/python/corpus/list-comprehension.parseA.txt +++ b/test/fixtures/python/corpus/list-comprehension.parseA.txt @@ -1,13 +1,35 @@ -(Statements - (Comprehension - (Identifier) - (Statements - (Identifier) - (Identifier))) - (Comprehension - (Identifier) - (Statements - (Statements - (Identifier) - (Identifier)) - (Identifier)))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (ListComprehension + (Expression + (PrimaryExpression + (Identifier "c"))) + (ForInClause + (Variables + (PrimaryExpression + (Identifier "b"))) + (Expression + (PrimaryExpression + (Identifier "a"))))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (ListComprehension + (Expression + (PrimaryExpression + (Identifier "d"))) + (ForInClause + (Variables + (PrimaryExpression + (Identifier "e"))) + (Expression + (PrimaryExpression + (Identifier "f")))) + (IfClause + (Expression + (PrimaryExpression + (Identifier "d")))))))))) diff --git a/test/fixtures/python/corpus/list-comprehension.parseB.txt b/test/fixtures/python/corpus/list-comprehension.parseB.txt index fcddcd1b9..b57e2a361 100644 --- a/test/fixtures/python/corpus/list-comprehension.parseB.txt +++ b/test/fixtures/python/corpus/list-comprehension.parseB.txt @@ -1,23 +1,57 @@ -(Statements - (Comprehension - (Identifier) - (Statements - (Statements - (Identifier) - (Identifier)) - (Call - (Identifier) - (Empty)) - (Statements - (Identifier) - (Identifier)) - (Call - (Identifier) - (Empty)))) - (Comprehension - (Plus - (Identifier) - (Integer)) - (Statements - (Identifier) - (Identifier)))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (ListComprehension + (Expression + (PrimaryExpression + (Identifier "f"))) + (ForInClause + (Variables + (PrimaryExpression + (Identifier "e"))) + (Expression + (PrimaryExpression + (Identifier "d")))) + (IfClause + (Expression + (PrimaryExpression + (Call + (PrimaryExpression + (Identifier "f")) + (ArgumentList))))) + (ForInClause + (Variables + (PrimaryExpression + (Identifier "g"))) + (Expression + (PrimaryExpression + (Identifier "h")))) + (IfClause + (Expression + (PrimaryExpression + (Call + (PrimaryExpression + (Identifier "g")) + (ArgumentList)))))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (ListComprehension + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "c")) + (PrimaryExpression + (Integer "1"))))) + (ForInClause + (Variables + (PrimaryExpression + (Identifier "b"))) + (Expression + (PrimaryExpression + (Identifier "a")))))))))) diff --git a/test/fixtures/python/corpus/list.parseA.txt b/test/fixtures/python/corpus/list.parseA.txt index 8d9030127..f58dc39fe 100644 --- a/test/fixtures/python/corpus/list.parseA.txt +++ b/test/fixtures/python/corpus/list.parseA.txt @@ -1,10 +1,34 @@ -(Statements - (Array) - (Array - (Integer) - (Integer) - (Integer)) - (Array - (Identifier) - (Identifier) - (Identifier))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (List))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (List + (Expression + (PrimaryExpression + (Integer "1"))) + (Expression + (PrimaryExpression + (Integer "2"))) + (Expression + (PrimaryExpression + (Integer "3")))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (List + (Expression + (PrimaryExpression + (Identifier "a"))) + (Expression + (PrimaryExpression + (Identifier "b"))) + (Expression + (PrimaryExpression + (Identifier "c"))))))))) diff --git a/test/fixtures/python/corpus/list.parseB.txt b/test/fixtures/python/corpus/list.parseB.txt index b8b3d71a9..6cf99c21b 100644 --- a/test/fixtures/python/corpus/list.parseB.txt +++ b/test/fixtures/python/corpus/list.parseB.txt @@ -1,8 +1,28 @@ -(Statements - (Array - (Identifier)) - (Array - (Integer) - (Integer)) - (Array - (Identifier))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (List + (Expression + (PrimaryExpression + (Identifier "print")))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (List + (Expression + (PrimaryExpression + (Integer "1"))) + (Expression + (PrimaryExpression + (Integer "3")))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (List + (Expression + (PrimaryExpression + (Identifier "b"))))))))) diff --git a/test/fixtures/python/corpus/non-local-statement.parseA.txt b/test/fixtures/python/corpus/non-local-statement.parseA.txt index 3e6149a15..d9ec9b33a 100644 --- a/test/fixtures/python/corpus/non-local-statement.parseA.txt +++ b/test/fixtures/python/corpus/non-local-statement.parseA.txt @@ -1,5 +1,4 @@ -(Statements - (Call - (Identifier) - (Identifier) - (Empty))) +(Module + (SimpleStatement + (NonlocalStatement + (Identifier "a")))) diff --git a/test/fixtures/python/corpus/non-local-statement.parseB.txt b/test/fixtures/python/corpus/non-local-statement.parseB.txt index 3e6149a15..9ce693eeb 100644 --- a/test/fixtures/python/corpus/non-local-statement.parseB.txt +++ b/test/fixtures/python/corpus/non-local-statement.parseB.txt @@ -1,5 +1,4 @@ -(Statements - (Call - (Identifier) - (Identifier) - (Empty))) +(Module + (SimpleStatement + (NonlocalStatement + (Identifier "b")))) diff --git a/test/fixtures/python/corpus/none.parseA.txt b/test/fixtures/python/corpus/none.parseA.txt index 4af9c5927..bfbb9800d 100644 --- a/test/fixtures/python/corpus/none.parseA.txt +++ b/test/fixtures/python/corpus/none.parseA.txt @@ -1,3 +1,11 @@ -(Statements - (Null) - (Null)) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (None "None"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (None "None")))))) diff --git a/test/fixtures/python/corpus/none.parseB.txt b/test/fixtures/python/corpus/none.parseB.txt index 5c722556e..74f74f74b 100644 --- a/test/fixtures/python/corpus/none.parseB.txt +++ b/test/fixtures/python/corpus/none.parseB.txt @@ -1,2 +1,6 @@ -(Statements - (Null)) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (None "None")))))) diff --git a/test/fixtures/python/corpus/not.parseA.txt b/test/fixtures/python/corpus/not.parseA.txt index 2aac4ecc8..23ee7859d 100644 --- a/test/fixtures/python/corpus/not.parseA.txt +++ b/test/fixtures/python/corpus/not.parseA.txt @@ -1,3 +1,8 @@ -(Statements - (Not - (Identifier))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (NotOperator + (Expression + (PrimaryExpression + (Identifier "a")))))))) diff --git a/test/fixtures/python/corpus/not.parseB.txt b/test/fixtures/python/corpus/not.parseB.txt index 8a8d2c144..ea7ae409a 100644 --- a/test/fixtures/python/corpus/not.parseB.txt +++ b/test/fixtures/python/corpus/not.parseB.txt @@ -1,5 +1,15 @@ -(Statements - (Not - (Identifier)) - (Not - (Identifier))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (NotOperator + (Expression + (PrimaryExpression + (Identifier "c"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (NotOperator + (Expression + (PrimaryExpression + (Identifier "b")))))))) diff --git a/test/fixtures/python/corpus/pass-statement.parseA.txt b/test/fixtures/python/corpus/pass-statement.parseA.txt index acbee74d6..7c5a4213a 100644 --- a/test/fixtures/python/corpus/pass-statement.parseA.txt +++ b/test/fixtures/python/corpus/pass-statement.parseA.txt @@ -1,3 +1,3 @@ -(Statements - (NoOp - (Empty))) +(Module + (SimpleStatement + (PassStatement "pass"))) diff --git a/test/fixtures/python/corpus/pass-statement.parseB.txt b/test/fixtures/python/corpus/pass-statement.parseB.txt index ce27612bd..a671c02bb 100644 --- a/test/fixtures/python/corpus/pass-statement.parseB.txt +++ b/test/fixtures/python/corpus/pass-statement.parseB.txt @@ -1,5 +1,5 @@ -(Statements - (NoOp - (Empty)) - (NoOp - (Empty))) +(Module + (SimpleStatement + (PassStatement "pass")) + (SimpleStatement + (PassStatement "pass"))) diff --git a/test/fixtures/python/corpus/print-statement.parseA.txt b/test/fixtures/python/corpus/print-statement.parseA.txt index dc1c75d2f..15111de3e 100644 --- a/test/fixtures/python/corpus/print-statement.parseA.txt +++ b/test/fixtures/python/corpus/print-statement.parseA.txt @@ -1,25 +1,45 @@ -(Statements - (Call - (Identifier) - (Identifier) - (Identifier) - (Empty)) - (Call - (Identifier) - (Identifier) - (Empty)) - (Call - (Identifier) - (Or - (Integer) - (Integer)) - (Empty)) - (Call - (Identifier) - (Or - (Integer) - (Integer)) - (Or - (Integer) - (Integer)) - (Empty))) +(Module + (SimpleStatement + (PrintStatement + (Expression + (PrimaryExpression + (Identifier "a"))) + (Expression + (PrimaryExpression + (Identifier "b"))))) + (SimpleStatement + (PrintStatement + (Expression + (PrimaryExpression + (Identifier "c"))))) + (SimpleStatement + (PrintStatement + (Expression + (BooleanOperator + (Token) + (Expression + (PrimaryExpression + (Integer "0"))) + (Expression + (PrimaryExpression + (Integer "1"))))))) + (SimpleStatement + (PrintStatement + (Expression + (BooleanOperator + (Token) + (Expression + (PrimaryExpression + (Integer "0"))) + (Expression + (PrimaryExpression + (Integer "1"))))) + (Expression + (BooleanOperator + (Token) + (Expression + (PrimaryExpression + (Integer "1"))) + (Expression + (PrimaryExpression + (Integer "0")))))))) diff --git a/test/fixtures/python/corpus/print-statement.parseB.txt b/test/fixtures/python/corpus/print-statement.parseB.txt index dc1c75d2f..eff0d8087 100644 --- a/test/fixtures/python/corpus/print-statement.parseB.txt +++ b/test/fixtures/python/corpus/print-statement.parseB.txt @@ -1,25 +1,45 @@ -(Statements - (Call - (Identifier) - (Identifier) - (Identifier) - (Empty)) - (Call - (Identifier) - (Identifier) - (Empty)) - (Call - (Identifier) - (Or - (Integer) - (Integer)) - (Empty)) - (Call - (Identifier) - (Or - (Integer) - (Integer)) - (Or - (Integer) - (Integer)) - (Empty))) +(Module + (SimpleStatement + (PrintStatement + (Expression + (PrimaryExpression + (Identifier "c"))) + (Expression + (PrimaryExpression + (Identifier "a"))))) + (SimpleStatement + (PrintStatement + (Expression + (PrimaryExpression + (Identifier "b"))))) + (SimpleStatement + (PrintStatement + (Expression + (BooleanOperator + (Token) + (Expression + (PrimaryExpression + (Integer "0"))) + (Expression + (PrimaryExpression + (Integer "1"))))))) + (SimpleStatement + (PrintStatement + (Expression + (BooleanOperator + (Token) + (Expression + (PrimaryExpression + (Integer "1"))) + (Expression + (PrimaryExpression + (Integer "0"))))) + (Expression + (BooleanOperator + (Token) + (Expression + (PrimaryExpression + (Integer "0"))) + (Expression + (PrimaryExpression + (Integer "1")))))))) diff --git a/test/fixtures/python/corpus/raise-statement.parseA.txt b/test/fixtures/python/corpus/raise-statement.parseA.txt index b0ee65fa0..3373b18f7 100644 --- a/test/fixtures/python/corpus/raise-statement.parseA.txt +++ b/test/fixtures/python/corpus/raise-statement.parseA.txt @@ -1,15 +1,30 @@ -(Statements - (Throw - (Statements)) - (Throw - (Call - (Identifier) - (TextElement) - (Empty))) - (Throw - (Statements - (Call - (Identifier) - (TextElement) - (Empty)) - (Identifier)))) +(Module + (SimpleStatement + (RaiseStatement)) + (SimpleStatement + (RaiseStatement + (ExpressionList + (Expression + (PrimaryExpression + (Call + (PrimaryExpression + (Identifier "RuntimeError")) + (ArgumentList + (Expression + (PrimaryExpression + (String)))))))))) + (SimpleStatement + (RaiseStatement + (Expression + (PrimaryExpression + (Identifier "e"))) + (ExpressionList + (Expression + (PrimaryExpression + (Call + (PrimaryExpression + (Identifier "RunTimeError")) + (ArgumentList + (Expression + (PrimaryExpression + (String))))))))))) diff --git a/test/fixtures/python/corpus/raise-statement.parseB.txt b/test/fixtures/python/corpus/raise-statement.parseB.txt index b6730223e..abb354b63 100644 --- a/test/fixtures/python/corpus/raise-statement.parseB.txt +++ b/test/fixtures/python/corpus/raise-statement.parseB.txt @@ -1,15 +1,30 @@ -(Statements - (Throw - (Call - (Identifier) - (TextElement) - (Empty))) - (Throw - (Statements - (Call - (Identifier) - (TextElement) - (Empty)) - (Identifier))) - (Throw - (Statements))) +(Module + (SimpleStatement + (RaiseStatement + (ExpressionList + (Expression + (PrimaryExpression + (Call + (PrimaryExpression + (Identifier "RuntimeError")) + (ArgumentList + (Expression + (PrimaryExpression + (String)))))))))) + (SimpleStatement + (RaiseStatement + (Expression + (PrimaryExpression + (Identifier "f"))) + (ExpressionList + (Expression + (PrimaryExpression + (Call + (PrimaryExpression + (Identifier "RunTimeError")) + (ArgumentList + (Expression + (PrimaryExpression + (String)))))))))) + (SimpleStatement + (RaiseStatement))) diff --git a/test/fixtures/python/corpus/return-statement.parseA.txt b/test/fixtures/python/corpus/return-statement.parseA.txt index cd8b4535c..e0e43f728 100644 --- a/test/fixtures/python/corpus/return-statement.parseA.txt +++ b/test/fixtures/python/corpus/return-statement.parseA.txt @@ -1,12 +1,25 @@ -(Statements - (Return - (Empty)) - (Return - (Statements - (Plus - (Identifier) - (Identifier)) - (Identifier))) - (Return - (Not - (Identifier)))) +(Module + (SimpleStatement + (ReturnStatement)) + (SimpleStatement + (ReturnStatement + (ExpressionList + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "a")) + (PrimaryExpression + (Identifier "b"))))) + (Expression + (PrimaryExpression + (Identifier "c")))))) + (SimpleStatement + (ReturnStatement + (ExpressionList + (Expression + (NotOperator + (Expression + (PrimaryExpression + (Identifier "b"))))))))) diff --git a/test/fixtures/python/corpus/return-statement.parseB.txt b/test/fixtures/python/corpus/return-statement.parseB.txt index 86edac90a..b0f75f419 100644 --- a/test/fixtures/python/corpus/return-statement.parseB.txt +++ b/test/fixtures/python/corpus/return-statement.parseB.txt @@ -1,12 +1,25 @@ -(Statements - (Return - (Statements - (Plus - (Identifier) - (Identifier)) - (Identifier))) - (Return - (Empty)) - (Return - (Not - (Identifier)))) +(Module + (SimpleStatement + (ReturnStatement + (ExpressionList + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "c")) + (PrimaryExpression + (Identifier "a"))))) + (Expression + (PrimaryExpression + (Identifier "b")))))) + (SimpleStatement + (ReturnStatement)) + (SimpleStatement + (ReturnStatement + (ExpressionList + (Expression + (NotOperator + (Expression + (PrimaryExpression + (Identifier "a"))))))))) diff --git a/test/fixtures/python/corpus/set-comprehension.parseA.txt b/test/fixtures/python/corpus/set-comprehension.parseA.txt index ead6841ee..f39d9a7b8 100644 --- a/test/fixtures/python/corpus/set-comprehension.parseA.txt +++ b/test/fixtures/python/corpus/set-comprehension.parseA.txt @@ -1,11 +1,31 @@ -(Statements - (Comprehension - (Identifier) - (Statements - (Identifier) - (Identifier))) - (Comprehension - (Identifier) - (Statements - (Identifier) - (Identifier)))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (SetComprehension + (Expression + (PrimaryExpression + (Identifier "c"))) + (ForInClause + (Variables + (PrimaryExpression + (Identifier "b"))) + (Expression + (PrimaryExpression + (Identifier "a"))))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (SetComprehension + (Expression + (PrimaryExpression + (Identifier "d"))) + (ForInClause + (Variables + (PrimaryExpression + (Identifier "e"))) + (Expression + (PrimaryExpression + (Identifier "f")))))))))) diff --git a/test/fixtures/python/corpus/set-comprehension.parseB.txt b/test/fixtures/python/corpus/set-comprehension.parseB.txt index 9afbdfa93..7a043d2b0 100644 --- a/test/fixtures/python/corpus/set-comprehension.parseB.txt +++ b/test/fixtures/python/corpus/set-comprehension.parseB.txt @@ -1,13 +1,36 @@ -(Statements - (Comprehension - (Identifier) - (Statements - (Identifier) - (Identifier))) - (Comprehension - (Plus - (Identifier) - (Integer)) - (Statements - (Identifier) - (Identifier)))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (SetComprehension + (Expression + (PrimaryExpression + (Identifier "f"))) + (ForInClause + (Variables + (PrimaryExpression + (Identifier "e"))) + (Expression + (PrimaryExpression + (Identifier "d"))))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (SetComprehension + (Expression + (PrimaryExpression + (BinaryOperator + (Token) + (PrimaryExpression + (Identifier "c")) + (PrimaryExpression + (Integer "1"))))) + (ForInClause + (Variables + (PrimaryExpression + (Identifier "b"))) + (Expression + (PrimaryExpression + (Identifier "a")))))))))) diff --git a/test/fixtures/python/corpus/set.parseA.txt b/test/fixtures/python/corpus/set.parseA.txt index a34a7adcd..791dd916b 100644 --- a/test/fixtures/python/corpus/set.parseA.txt +++ b/test/fixtures/python/corpus/set.parseA.txt @@ -1,6 +1,20 @@ -(Statements - (Hash) - (Set - (Integer) - (Integer) - (Integer))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Dictionary))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Set + (Expression + (PrimaryExpression + (Integer "1"))) + (Expression + (PrimaryExpression + (Integer "2"))) + (Expression + (PrimaryExpression + (Integer "3"))))))))) diff --git a/test/fixtures/python/corpus/set.parseB.txt b/test/fixtures/python/corpus/set.parseB.txt index 2ca89b7cd..8843c98cc 100644 --- a/test/fixtures/python/corpus/set.parseB.txt +++ b/test/fixtures/python/corpus/set.parseB.txt @@ -1,7 +1,23 @@ -(Statements - (Set - (Integer)) - (Set - (Integer) - (Integer) - (Integer))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Set + (Expression + (PrimaryExpression + (Integer "1")))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Set + (Expression + (PrimaryExpression + (Integer "3"))) + (Expression + (PrimaryExpression + (Integer "2"))) + (Expression + (PrimaryExpression + (Integer "1"))))))))) diff --git a/test/fixtures/python/corpus/slice.parseA.txt b/test/fixtures/python/corpus/slice.parseA.txt index bca8cd11b..8f895b1f2 100644 --- a/test/fixtures/python/corpus/slice.parseA.txt +++ b/test/fixtures/python/corpus/slice.parseA.txt @@ -1,26 +1,46 @@ -(Statements - (Subscript - (Identifier) - (Enumeration - (Empty) - (Empty) - (Empty))) - (Subscript - (Identifier) - (Enumeration - (Integer) - (Empty) - (Empty))) - (Subscript - (Identifier) - (Enumeration - (Integer) - (Integer) - (Empty)) - (Ellipsis)) - (Subscript - (Identifier) - (Enumeration - (Empty) - (Empty) - (Empty)))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Subscript + (Slice) + (PrimaryExpression + (Identifier "a"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Subscript + (Slice + (Expression + (PrimaryExpression + (Integer "5")))) + (PrimaryExpression + (Identifier "b"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Subscript + (Slice + (Expression + (PrimaryExpression + (Integer "5"))) + (Expression + (PrimaryExpression + (Integer "6")))) + (Token) + (Expression + (PrimaryExpression + (Ellipsis "..."))) + (PrimaryExpression + (Identifier "b"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Subscript + (Slice) + (PrimaryExpression + (Identifier "c")))))))) diff --git a/test/fixtures/python/corpus/slice.parseB.txt b/test/fixtures/python/corpus/slice.parseB.txt index aee117b12..2213c5a6f 100644 --- a/test/fixtures/python/corpus/slice.parseB.txt +++ b/test/fixtures/python/corpus/slice.parseB.txt @@ -1,26 +1,46 @@ -(Statements - (Subscript - (Identifier) - (Enumeration - (Integer) - (Integer) - (Empty)) - (Ellipsis)) - (Subscript - (Identifier) - (Enumeration - (Empty) - (Empty) - (Empty))) - (Subscript - (Identifier) - (Enumeration - (Integer) - (Empty) - (Empty))) - (Subscript - (Identifier) - (Enumeration - (Empty) - (Empty) - (Empty)))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Subscript + (Slice + (Expression + (PrimaryExpression + (Integer "4"))) + (Expression + (PrimaryExpression + (Integer "5")))) + (Token) + (Expression + (PrimaryExpression + (Ellipsis "..."))) + (PrimaryExpression + (Identifier "c"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Subscript + (Slice) + (PrimaryExpression + (Identifier "a"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Subscript + (Slice + (Expression + (PrimaryExpression + (Integer "3")))) + (PrimaryExpression + (Identifier "d"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Subscript + (Slice) + (PrimaryExpression + (Identifier "e")))))))) diff --git a/test/fixtures/python/corpus/string.parseA.txt b/test/fixtures/python/corpus/string.parseA.txt index f7fef4dfe..11bf1c4da 100644 --- a/test/fixtures/python/corpus/string.parseA.txt +++ b/test/fixtures/python/corpus/string.parseA.txt @@ -1,10 +1,48 @@ -(Statements - (TextElement) - (TextElement) - (TextElement) - (TextElement) - (TextElement) - (TextElement) - (TextElement) - (TextElement) - (TextElement)) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (String))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (String))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (String))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (String))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (String))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (String))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (String + (EscapeSequence "\\\\")))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (String))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (String + (EscapeSequence "\\\n"))))))) diff --git a/test/fixtures/python/corpus/string.parseB.txt b/test/fixtures/python/corpus/string.parseB.txt index 9d589ddfd..f6eb0408d 100644 --- a/test/fixtures/python/corpus/string.parseB.txt +++ b/test/fixtures/python/corpus/string.parseB.txt @@ -1,9 +1,42 @@ -(Statements - (TextElement) - (TextElement) - (TextElement) - (TextElement) - (TextElement) - (TextElement) - (TextElement) - (TextElement)) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (String + (EscapeSequence "\\\n")))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (String))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (String))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (String))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (String))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (String))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (String))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (String)))))) diff --git a/test/fixtures/python/corpus/subscript.parseA.txt b/test/fixtures/python/corpus/subscript.parseA.txt index e2c7fbd55..755137d5e 100644 --- a/test/fixtures/python/corpus/subscript.parseA.txt +++ b/test/fixtures/python/corpus/subscript.parseA.txt @@ -1,4 +1,11 @@ -(Statements - (Subscript - (Identifier) - (Identifier))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Subscript + (Expression + (PrimaryExpression + (Identifier "b"))) + (PrimaryExpression + (Identifier "a")))))))) diff --git a/test/fixtures/python/corpus/subscript.parseB.txt b/test/fixtures/python/corpus/subscript.parseB.txt index e2c7fbd55..fbbd70f70 100644 --- a/test/fixtures/python/corpus/subscript.parseB.txt +++ b/test/fixtures/python/corpus/subscript.parseB.txt @@ -1,4 +1,11 @@ -(Statements - (Subscript - (Identifier) - (Identifier))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Subscript + (Expression + (PrimaryExpression + (Identifier "a"))) + (PrimaryExpression + (Identifier "b")))))))) diff --git a/test/fixtures/python/corpus/try-statement.parseA.txt b/test/fixtures/python/corpus/try-statement.parseA.txt index 82828c65e..b83185e68 100644 --- a/test/fixtures/python/corpus/try-statement.parseA.txt +++ b/test/fixtures/python/corpus/try-statement.parseA.txt @@ -1,41 +1,102 @@ -(Statements - (Try - (Statements - (Identifier) - (Identifier)) - (Catch - (Statements - (Identifier) - (Statements - (Identifier) - (Identifier))) - (Statements)) - (Catch - (Let - (Identifier) - (Identifier) - (Empty)) - (Statements - (Identifier) - (Identifier))) - (Catch - (Statements - (Identifier) - (Identifier) - (Statements - (Identifier) - (Identifier))) - (Statements)) - (Catch - (Statements - (Identifier) - (Identifier)) - (Statements))) - (Try - (Statements - (Identifier) - (Identifier)) - (Finally - (Statements - (Identifier) - (Identifier))))) +(Module + (CompoundStatement + (TryStatement + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "a"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "b")))))) + (ExceptClause + (Expression + (PrimaryExpression + (Identifier "b"))) + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "c"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "d"))))))) + (ExceptClause + (Expression + (PrimaryExpression + (Identifier "d"))) + (Expression + (PrimaryExpression + (Identifier "e"))) + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "f"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "g"))))))) + (ExceptClause + (Expression + (PrimaryExpression + (Identifier "g"))) + (Expression + (PrimaryExpression + (Identifier "h"))) + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "i"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "j"))))))) + (ExceptClause + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "j"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "k"))))))))) + (CompoundStatement + (TryStatement + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "a"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "b")))))) + (FinallyClause + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "a"))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "b")))))))))) diff --git a/test/fixtures/python/corpus/try-statement.parseB.txt b/test/fixtures/python/corpus/try-statement.parseB.txt index 6a18c7a54..6a78f8fa3 100644 --- a/test/fixtures/python/corpus/try-statement.parseB.txt +++ b/test/fixtures/python/corpus/try-statement.parseB.txt @@ -1,27 +1,67 @@ -(Statements - (Try - (Identifier) - (Finally - (Identifier))) - (Try - (Identifier) - (Catch - (Statements - (Identifier) - (Identifier)) - (Statements)) - (Catch - (Let - (Identifier) - (Identifier) - (Empty)) - (Identifier)) - (Catch - (Statements - (Identifier) - (Identifier) - (Identifier)) - (Statements)) - (Catch - (Identifier) - (Statements)))) +(Module + (CompoundStatement + (TryStatement + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "b")))))) + (FinallyClause + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "c"))))))))) + (CompoundStatement + (TryStatement + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "e")))))) + (ExceptClause + (Expression + (PrimaryExpression + (Identifier "f"))) + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "d"))))))) + (ExceptClause + (Expression + (PrimaryExpression + (Identifier "g"))) + (Expression + (PrimaryExpression + (Identifier "h"))) + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "a"))))))) + (ExceptClause + (Expression + (PrimaryExpression + (Identifier "i"))) + (Expression + (PrimaryExpression + (Identifier "j"))) + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "k"))))))) + (ExceptClause + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "l")))))))))) diff --git a/test/fixtures/python/corpus/tuple.parseA.txt b/test/fixtures/python/corpus/tuple.parseA.txt index 22c207c41..772182734 100644 --- a/test/fixtures/python/corpus/tuple.parseA.txt +++ b/test/fixtures/python/corpus/tuple.parseA.txt @@ -1,8 +1,26 @@ -(Statements - (Tuple - (Identifier) - (Identifier)) - (Tuple - (Identifier) - (Identifier) - (Identifier))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Tuple + (Expression + (PrimaryExpression + (Identifier "a"))) + (Expression + (PrimaryExpression + (Identifier "b")))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Tuple + (Expression + (PrimaryExpression + (Identifier "a"))) + (Expression + (PrimaryExpression + (Identifier "b"))) + (Expression + (PrimaryExpression + (Identifier "c"))))))))) diff --git a/test/fixtures/python/corpus/tuple.parseB.txt b/test/fixtures/python/corpus/tuple.parseB.txt index 0cf31e5b2..c8637e676 100644 --- a/test/fixtures/python/corpus/tuple.parseB.txt +++ b/test/fixtures/python/corpus/tuple.parseB.txt @@ -1,9 +1,34 @@ -(Statements - (Tuple - (Identifier) - (Identifier) - (Identifier)) - (Tuple - (Identifier) - (Identifier)) - (Identifier)) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Tuple + (Expression + (PrimaryExpression + (Identifier "b"))) + (Expression + (PrimaryExpression + (Identifier "c"))) + (Expression + (PrimaryExpression + (Identifier "a")))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Tuple + (Expression + (PrimaryExpression + (Identifier "b"))) + (Expression + (PrimaryExpression + (Identifier "c")))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (ParenthesizedExpression + (Expression + (PrimaryExpression + (Identifier "a"))))))))) diff --git a/test/fixtures/python/corpus/unary-operator.parseA.txt b/test/fixtures/python/corpus/unary-operator.parseA.txt index e92f638ae..17f4bd317 100644 --- a/test/fixtures/python/corpus/unary-operator.parseA.txt +++ b/test/fixtures/python/corpus/unary-operator.parseA.txt @@ -1,6 +1,25 @@ -(Statements - (Negate - (Identifier)) - (Identifier) - (Complement - (Identifier))) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (UnaryOperator + (Token) + (PrimaryExpression + (Identifier "a"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (UnaryOperator + (Token) + (PrimaryExpression + (Identifier "b"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (UnaryOperator + (Token) + (PrimaryExpression + (Identifier "c")))))))) diff --git a/test/fixtures/python/corpus/unary-operator.parseB.txt b/test/fixtures/python/corpus/unary-operator.parseB.txt index f3d6e2da6..17f4bd317 100644 --- a/test/fixtures/python/corpus/unary-operator.parseB.txt +++ b/test/fixtures/python/corpus/unary-operator.parseB.txt @@ -1,6 +1,25 @@ -(Statements - (Complement - (Identifier)) - (Negate - (Identifier)) - (Identifier)) +(Module + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (UnaryOperator + (Token) + (PrimaryExpression + (Identifier "a"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (UnaryOperator + (Token) + (PrimaryExpression + (Identifier "b"))))))) + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (UnaryOperator + (Token) + (PrimaryExpression + (Identifier "c")))))))) diff --git a/test/fixtures/python/corpus/while-statement.parseA.txt b/test/fixtures/python/corpus/while-statement.parseA.txt index f8687d813..4be9d1568 100644 --- a/test/fixtures/python/corpus/while-statement.parseA.txt +++ b/test/fixtures/python/corpus/while-statement.parseA.txt @@ -1,10 +1,13 @@ -(Statements - (While - (Identifier) - (Statements - (NoOp - (Empty)) - (Break - (Empty)) - (Continue - (Empty))))) +(Module + (CompoundStatement + (WhileStatement + (Block + (SimpleStatement + (PassStatement "pass")) + (SimpleStatement + (BreakStatement "break")) + (SimpleStatement + (ContinueStatement "continue"))) + (Expression + (PrimaryExpression + (Identifier "true")))))) diff --git a/test/fixtures/python/corpus/while-statement.parseB.txt b/test/fixtures/python/corpus/while-statement.parseB.txt index a6059e837..e72981f03 100644 --- a/test/fixtures/python/corpus/while-statement.parseB.txt +++ b/test/fixtures/python/corpus/while-statement.parseB.txt @@ -1,10 +1,13 @@ -(Statements - (While - (Identifier) - (Statements - (Break - (Empty)) - (Continue - (Empty)) - (NoOp - (Empty))))) +(Module + (CompoundStatement + (WhileStatement + (Block + (SimpleStatement + (BreakStatement "break")) + (SimpleStatement + (ContinueStatement "continue")) + (SimpleStatement + (PassStatement "pass"))) + (Expression + (PrimaryExpression + (Identifier "false")))))) diff --git a/test/fixtures/python/corpus/with-statement.parseA.txt b/test/fixtures/python/corpus/with-statement.parseA.txt index b5a13bb95..963cbe682 100644 --- a/test/fixtures/python/corpus/with-statement.parseA.txt +++ b/test/fixtures/python/corpus/with-statement.parseA.txt @@ -1,6 +1,16 @@ -(Statements - (Let - (Identifier) - (Identifier) - (Statements - (Identifier)))) +(Module + (CompoundStatement + (WithStatement + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "c")))))) + (WithItem + (Expression + (PrimaryExpression + (Identifier "a"))) + (Expression + (PrimaryExpression + (Identifier "b"))))))) diff --git a/test/fixtures/python/corpus/with-statement.parseB.txt b/test/fixtures/python/corpus/with-statement.parseB.txt index b5a13bb95..cec281db4 100644 --- a/test/fixtures/python/corpus/with-statement.parseB.txt +++ b/test/fixtures/python/corpus/with-statement.parseB.txt @@ -1,6 +1,16 @@ -(Statements - (Let - (Identifier) - (Identifier) - (Statements - (Identifier)))) +(Module + (CompoundStatement + (WithStatement + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "a")))))) + (WithItem + (Expression + (PrimaryExpression + (Identifier "b"))) + (Expression + (PrimaryExpression + (Identifier "c"))))))) diff --git a/test/fixtures/python/corpus/with.parseA.txt b/test/fixtures/python/corpus/with.parseA.txt index 43c0db99e..378d6c20e 100644 --- a/test/fixtures/python/corpus/with.parseA.txt +++ b/test/fixtures/python/corpus/with.parseA.txt @@ -1,19 +1,52 @@ -(Statements - (Let - (Identifier) - (Call - (Identifier) - (Identifier) - (TextElement) - (Empty)) - (Statements - (Assignment - (Identifier) - (Boolean)) - (ForEach - (Identifier) - (Identifier) - (Statements - (Assignment - (Identifier) - (Boolean))))))) +(Module + (CompoundStatement + (WithStatement + (Block + (SimpleStatement + (ExpressionStatement + (Assignment + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "found")))) + (ExpressionList + (Expression + (PrimaryExpression + (False "False"))))))) + (CompoundStatement + (ForStatement + (Block + (SimpleStatement + (ExpressionStatement + (Assignment + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "found")))) + (ExpressionList + (Expression + (PrimaryExpression + (True "True")))))))) + (Variables + (PrimaryExpression + (Identifier "line"))) + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "lines"))))))) + (WithItem + (Expression + (PrimaryExpression + (Call + (PrimaryExpression + (Identifier "open")) + (ArgumentList + (Expression + (PrimaryExpression + (Identifier "nsfile"))) + (Expression + (PrimaryExpression + (String))))))) + (Expression + (PrimaryExpression + (Identifier "f"))))))) diff --git a/test/fixtures/python/corpus/with.parseB.txt b/test/fixtures/python/corpus/with.parseB.txt index 603995fc9..94cc95bd2 100644 --- a/test/fixtures/python/corpus/with.parseB.txt +++ b/test/fixtures/python/corpus/with.parseB.txt @@ -1,32 +1,68 @@ -(Statements - (Let - (Empty) - (MemberAccess - (Identifier) - (Identifier)) - (Statements - (Assignment - (Identifier) - (Boolean)))) - (Let - (Empty) - (Call - (MemberAccess - (Identifier) - (Identifier)) - (Identifier) - (TextElement) - (Identifier) - (Empty)) - (Let - (Empty) - (Call - (MemberAccess - (Identifier) - (Identifier)) - (Identifier) - (TextElement) - (Identifier) - (Empty)) - (Statements - (Identifier))))) +(Module + (CompoundStatement + (WithStatement + (Block + (SimpleStatement + (ExpressionStatement + (Assignment + (ExpressionList + (Expression + (PrimaryExpression + (Identifier "found")))) + (ExpressionList + (Expression + (PrimaryExpression + (False "False")))))))) + (WithItem + (Expression + (PrimaryExpression + (Attribute + (Identifier "_lock") + (PrimaryExpression + (Identifier "cls")))))))) + (CompoundStatement + (WithStatement + (Block + (SimpleStatement + (ExpressionStatement + (Expression + (PrimaryExpression + (Identifier "x")))))) + (WithItem + (Expression + (PrimaryExpression + (Call + (PrimaryExpression + (Attribute + (Identifier "object") + (PrimaryExpression + (Identifier "patch")))) + (ArgumentList + (Expression + (PrimaryExpression + (Identifier "sys"))) + (Expression + (PrimaryExpression + (String))) + (Expression + (PrimaryExpression + (Identifier "stdout")))))))) + (WithItem + (Expression + (PrimaryExpression + (Call + (PrimaryExpression + (Attribute + (Identifier "object") + (PrimaryExpression + (Identifier "patch")))) + (ArgumentList + (Expression + (PrimaryExpression + (Identifier "sys"))) + (Expression + (PrimaryExpression + (String))) + (Expression + (PrimaryExpression + (Identifier "stderr"))))))))))) diff --git a/test/fixtures/python/corpus/yield.parseA.txt b/test/fixtures/python/corpus/yield.parseA.txt index 8663d7d6f..54f65d9fa 100644 --- a/test/fixtures/python/corpus/yield.parseA.txt +++ b/test/fixtures/python/corpus/yield.parseA.txt @@ -1,3 +1,4 @@ -(Statements - (Yield - (Empty))) +(Module + (SimpleStatement + (ExpressionStatement + (Yield)))) diff --git a/test/fixtures/python/corpus/yield.parseB.txt b/test/fixtures/python/corpus/yield.parseB.txt index 0f843e453..67f59180c 100644 --- a/test/fixtures/python/corpus/yield.parseB.txt +++ b/test/fixtures/python/corpus/yield.parseB.txt @@ -1,5 +1,7 @@ -(Statements - (Yield - (Empty)) - (Yield - (Empty))) +(Module + (SimpleStatement + (ExpressionStatement + (Yield))) + (SimpleStatement + (ExpressionStatement + (Yield)))) diff --git a/test/fixtures/ruby/corpus/alias.parseA.txt b/test/fixtures/ruby/corpus/alias.parseA.txt index 861f80cd1..b314381c2 100644 --- a/test/fixtures/ruby/corpus/alias.parseA.txt +++ b/test/fixtures/ruby/corpus/alias.parseA.txt @@ -1,29 +1,33 @@ -(Statements - (Call - (Identifier) - (SymbolElement) - (SymbolElement) - (Empty)) - (Call - (Identifier) - (Send - (Identifier)) - (Send - (Identifier)) - (Empty)) - (Call - (Identifier) - (Identifier) - (Identifier) - (Empty)) - (Call - (Identifier) - (Send - (Identifier)) - (Identifier) - (Empty)) - (Call - (Identifier) - (Identifier) - (Identifier) - (Empty))) +(Program + (Statement + (Alias + (MethodName + (Symbol)) + (MethodName + (Symbol)))) + (Statement + (Alias + (MethodName + (Identifier "bar")) + (MethodName + (Identifier "foo")))) + (Statement + (Alias + (MethodName + (GlobalVariable "$&")) + (MethodName + (GlobalVariable "$FOO")))) + (Statement + (Alias + (MethodName + (Operator "+")) + (MethodName + (Identifier "foo")))) + (Statement + (Alias + (MethodName + (Setter + (Identifier "bar"))) + (MethodName + (Setter + (Identifier "foo")))))) diff --git a/test/fixtures/ruby/corpus/and-or.parseA.txt b/test/fixtures/ruby/corpus/and-or.parseA.txt index cb6c2ab49..9d8751ddc 100644 --- a/test/fixtures/ruby/corpus/and-or.parseA.txt +++ b/test/fixtures/ruby/corpus/and-or.parseA.txt @@ -1,6 +1,14 @@ -(Statements - (LowPrecedenceAnd - (Send - (Identifier)) - (Send - (Identifier)))) +(Program + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "foo"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "bar")))))))) diff --git a/test/fixtures/ruby/corpus/and-or.parseB.txt b/test/fixtures/ruby/corpus/and-or.parseB.txt index 2a0a6e646..2dc8f7627 100644 --- a/test/fixtures/ruby/corpus/and-or.parseB.txt +++ b/test/fixtures/ruby/corpus/and-or.parseB.txt @@ -1,14 +1,35 @@ -(Statements - (LowPrecedenceOr - (Send - (Identifier)) - (Send - (Identifier))) - (LowPrecedenceAnd - (LowPrecedenceOr - (Send - (Identifier)) - (Send - (Identifier))) - (Send - (Identifier)))) +(Program + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "foo"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "bar"))))))) + (Statement + (Binary + (Token) + (Arg + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "c")))))))) diff --git a/test/fixtures/ruby/corpus/array.parseA.txt b/test/fixtures/ruby/corpus/array.parseA.txt index d32cf5a62..a7a40ce5f 100644 --- a/test/fixtures/ruby/corpus/array.parseA.txt +++ b/test/fixtures/ruby/corpus/array.parseA.txt @@ -1,5 +1,14 @@ -(Statements - (Array - (Integer) - (Integer) - (Integer))) +(Program + (Statement + (Arg + (Primary + (Array + (Arg + (Primary + (Integer "1"))) + (Arg + (Primary + (Integer "2"))) + (Arg + (Primary + (Integer "3")))))))) diff --git a/test/fixtures/ruby/corpus/array.parseB.txt b/test/fixtures/ruby/corpus/array.parseB.txt index 23b9ce5ed..c35ed7adf 100644 --- a/test/fixtures/ruby/corpus/array.parseB.txt +++ b/test/fixtures/ruby/corpus/array.parseB.txt @@ -1,5 +1,14 @@ -(Statements - (Array - (TextElement) - (TextElement) - (TextElement))) +(Program + (Statement + (Arg + (Primary + (Array + (Arg + (Primary + (String))) + (Arg + (Primary + (String))) + (Arg + (Primary + (String)))))))) diff --git a/test/fixtures/ruby/corpus/assignment.parseA.txt b/test/fixtures/ruby/corpus/assignment.parseA.txt index 96467e900..6cd58ec81 100644 --- a/test/fixtures/ruby/corpus/assignment.parseA.txt +++ b/test/fixtures/ruby/corpus/assignment.parseA.txt @@ -1,4 +1,9 @@ -(Statements - (Assignment - (Identifier) - (Integer))) +(Program + (Statement + (Assignment + (Lhs + (Variable + (Identifier "x"))) + (Arg + (Primary + (Integer "0")))))) diff --git a/test/fixtures/ruby/corpus/assignment.parseB.txt b/test/fixtures/ruby/corpus/assignment.parseB.txt index 96467e900..5e95f451d 100644 --- a/test/fixtures/ruby/corpus/assignment.parseB.txt +++ b/test/fixtures/ruby/corpus/assignment.parseB.txt @@ -1,4 +1,9 @@ -(Statements - (Assignment - (Identifier) - (Integer))) +(Program + (Statement + (Assignment + (Lhs + (Variable + (Identifier "x"))) + (Arg + (Primary + (Integer "1")))))) diff --git a/test/fixtures/ruby/corpus/begin-block.parseA.txt b/test/fixtures/ruby/corpus/begin-block.parseA.txt index 7a735f831..e53d7edde 100644 --- a/test/fixtures/ruby/corpus/begin-block.parseA.txt +++ b/test/fixtures/ruby/corpus/begin-block.parseA.txt @@ -1,4 +1,9 @@ -(Statements - (ScopeEntry - (Send - (Identifier)))) +(Program + (Statement + (BeginBlock + (Statement + (Arg + (Primary + (Lhs + (Variable + (Identifier "foo"))))))))) diff --git a/test/fixtures/ruby/corpus/begin-block.parseB.txt b/test/fixtures/ruby/corpus/begin-block.parseB.txt index bfa9115b8..7d2af170b 100644 --- a/test/fixtures/ruby/corpus/begin-block.parseB.txt +++ b/test/fixtures/ruby/corpus/begin-block.parseB.txt @@ -1,6 +1,15 @@ -(Statements - (Send - (Identifier)) - (ScopeEntry - (Send - (Identifier)))) +(Program + (Statement + (Arg + (Primary + (Lhs + (Variable + (Identifier "foo")))))) + (Statement + (BeginBlock + (Statement + (Arg + (Primary + (Lhs + (Variable + (Identifier "bar"))))))))) diff --git a/test/fixtures/ruby/corpus/begin.parseA.txt b/test/fixtures/ruby/corpus/begin.parseA.txt index c78fdebfe..a98b6ac27 100644 --- a/test/fixtures/ruby/corpus/begin.parseA.txt +++ b/test/fixtures/ruby/corpus/begin.parseA.txt @@ -1,7 +1,11 @@ -(Statements - (Method - (Empty) - (Identifier) - (Statements - (Try - (Statements))))) +(Program + (Statement + (Arg + (Primary + (Method + (MethodName + (Identifier "foo")) + (Statement + (Arg + (Primary + (Begin))))))))) diff --git a/test/fixtures/ruby/corpus/begin.parseB.txt b/test/fixtures/ruby/corpus/begin.parseB.txt index 48f91279a..675fb855b 100644 --- a/test/fixtures/ruby/corpus/begin.parseB.txt +++ b/test/fixtures/ruby/corpus/begin.parseB.txt @@ -1,9 +1,19 @@ -(Statements - (Method - (Empty) - (Identifier) - (Statements - (Try - (Send - (Identifier) - (TextElement)))))) +(Program + (Statement + (Arg + (Primary + (Method + (MethodName + (Identifier "foo")) + (Statement + (Arg + (Primary + (Begin + (Statement + (MethodCall + (ArgumentList + (Arg + (Primary + (String)))) + (Variable + (Identifier "puts"))))))))))))) diff --git a/test/fixtures/ruby/corpus/binary.parseA.txt b/test/fixtures/ruby/corpus/binary.parseA.txt index 18236c726..54d487f61 100644 --- a/test/fixtures/ruby/corpus/binary.parseA.txt +++ b/test/fixtures/ruby/corpus/binary.parseA.txt @@ -1,121 +1,300 @@ -(Statements - (And - (Send - (Identifier)) - (Send - (Identifier))) - (LowPrecedenceAnd - (Send - (Identifier)) - (Send - (Identifier))) - (LowPrecedenceOr - (Send - (Identifier)) - (Send - (Identifier))) - (Or - (Send - (Identifier)) - (Send - (Identifier))) - (Plus - (Send - (Identifier)) - (Send - (Identifier))) - (Context - (Comment) - (LShift - (Send - (Identifier)) - (Send - (Identifier)))) - (RShift - (Send - (Identifier)) - (Send - (Identifier))) - (BOr - (Send - (Identifier)) - (Send - (Identifier))) - (BAnd - (Send - (Identifier)) - (Send - (Identifier))) - (BXOr - (Send - (Identifier)) - (Send - (Identifier))) - (Equal - (Send - (Identifier)) - (Send - (Identifier))) - (Not - (Equal - (Send - (Identifier)) - (Send - (Identifier)))) - (Equal - (Send - (Identifier)) - (Send - (Identifier))) - (Comparison - (Send - (Identifier)) - (Send - (Identifier))) - (Matches - (Send - (Identifier)) - (Send - (Identifier))) - (NotMatches - (Send - (Identifier)) - (Send - (Identifier))) - (LessThan - (Send - (Identifier)) - (Send - (Identifier))) - (LessThanEqual - (Send - (Identifier)) - (Send - (Identifier))) - (GreaterThan - (Send - (Identifier)) - (Send - (Identifier))) - (GreaterThanEqual - (Send - (Identifier)) - (Send - (Identifier))) - (Context - (Comment) - (DividedBy - (Send - (Identifier)) - (Send - (Identifier)))) - (Modulo - (Send - (Identifier)) - (Send - (Identifier))) - (Power - (Send - (Identifier)) - (Send - (Identifier)))) +(Program + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b")))))))) diff --git a/test/fixtures/ruby/corpus/bitwise-operator.parseA.txt b/test/fixtures/ruby/corpus/bitwise-operator.parseA.txt index 54eee4aab..7205d2e94 100644 --- a/test/fixtures/ruby/corpus/bitwise-operator.parseA.txt +++ b/test/fixtures/ruby/corpus/bitwise-operator.parseA.txt @@ -1,16 +1,40 @@ -(Statements - (BOr - (Send - (Identifier)) - (Send - (Identifier))) - (RShift - (Send - (Identifier)) - (Send - (Identifier))) - (BXOr - (Send - (Identifier)) - (Send - (Identifier)))) +(Program + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b")))))))) diff --git a/test/fixtures/ruby/corpus/bitwise-operator.parseB.txt b/test/fixtures/ruby/corpus/bitwise-operator.parseB.txt index bf057bbf1..237d1f760 100644 --- a/test/fixtures/ruby/corpus/bitwise-operator.parseB.txt +++ b/test/fixtures/ruby/corpus/bitwise-operator.parseB.txt @@ -1,11 +1,27 @@ -(Statements - (BAnd - (Send - (Identifier)) - (Send - (Identifier))) - (LShift - (Send - (Identifier)) - (Send - (Identifier)))) +(Program + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b")))))))) diff --git a/test/fixtures/ruby/corpus/boolean-operator.parseA.txt b/test/fixtures/ruby/corpus/boolean-operator.parseA.txt index 14f55cb03..2154e4d3b 100644 --- a/test/fixtures/ruby/corpus/boolean-operator.parseA.txt +++ b/test/fixtures/ruby/corpus/boolean-operator.parseA.txt @@ -1,6 +1,14 @@ -(Statements - (Or - (Send - (Identifier)) - (Send - (Identifier)))) +(Program + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b")))))))) diff --git a/test/fixtures/ruby/corpus/boolean-operator.parseB.txt b/test/fixtures/ruby/corpus/boolean-operator.parseB.txt index 86762f3f7..2154e4d3b 100644 --- a/test/fixtures/ruby/corpus/boolean-operator.parseB.txt +++ b/test/fixtures/ruby/corpus/boolean-operator.parseB.txt @@ -1,6 +1,14 @@ -(Statements - (And - (Send - (Identifier)) - (Send - (Identifier)))) +(Program + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b")))))))) diff --git a/test/fixtures/ruby/corpus/break.parseA.txt b/test/fixtures/ruby/corpus/break.parseA.txt index 4cbb02603..ab7fdff85 100644 --- a/test/fixtures/ruby/corpus/break.parseA.txt +++ b/test/fixtures/ruby/corpus/break.parseA.txt @@ -1,6 +1,13 @@ -(Statements - (While - (Send - (Identifier)) - (Break - (Empty)))) +(Program + (Statement + (Arg + (Primary + (While + (Do + (Statement + (Break))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b")))))))))) diff --git a/test/fixtures/ruby/corpus/break.parseB.txt b/test/fixtures/ruby/corpus/break.parseB.txt index 1bc83882c..ee0c49102 100644 --- a/test/fixtures/ruby/corpus/break.parseB.txt +++ b/test/fixtures/ruby/corpus/break.parseB.txt @@ -1,7 +1,13 @@ -(Statements - (While - (Not - (Send - (Identifier))) - (Break - (Empty)))) +(Program + (Statement + (Arg + (Primary + (Until + (Do + (Statement + (Break))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b")))))))))) diff --git a/test/fixtures/ruby/corpus/calls.parseA.txt b/test/fixtures/ruby/corpus/calls.parseA.txt index e9867fff6..ae785549b 100644 --- a/test/fixtures/ruby/corpus/calls.parseA.txt +++ b/test/fixtures/ruby/corpus/calls.parseA.txt @@ -1,35 +1,88 @@ -(Statements - (Send - (Identifier) - (Send - (Identifier)) - (Send - (Identifier)) - (KeyValue - (SymbolElement) - (Integer)) - (KeyValue - (SymbolElement) - (Boolean))) - (Send - (Send - (Identifier)) - (Identifier)) - (Send - (Identifier) - (Send - (Identifier)) - (Send - (Identifier))) - (Send - (Identifier) - (Send - (Identifier))) - (Send - (Identifier) - (Send - (Identifier))) - (Send - (Identifier) - (Send - (Identifier)))) +(Program + (Statement + (MethodCall + (ArgumentList + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))) + (Pair + (Arg + (Primary + (Integer "1"))) + (Symbol)) + (Pair + (Arg + (Primary + (Lhs + (True "true")))) + (Symbol))) + (Variable + (Identifier "foo")))) + (Statement + (MethodCall + (ArgumentList) + (Call + (Primary + (Lhs + (Variable + (Identifier "a")))) + (Identifier "b")))) + (Statement + (MethodCall + (ArgumentList + (Arg + (Primary + (ParenthesizedStatements + (Statement + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a")))))) + (Variable + (Identifier "foo")))) + (Statement + (MethodCall + (ArgumentList + (BlockArgument + (Arg + (Primary + (Lhs + (Variable + (Identifier "block"))))))) + (Variable + (Identifier "foo")))) + (Statement + (MethodCall + (ArgumentList + (SplatArgument + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))))) + (Variable + (Identifier "foo")))) + (Statement + (MethodCall + (ArgumentList + (HashSplatArgument + (Arg + (Primary + (Lhs + (Variable + (Identifier "b"))))))) + (Variable + (Identifier "foo"))))) diff --git a/test/fixtures/ruby/corpus/chained-string.parseA.txt b/test/fixtures/ruby/corpus/chained-string.parseA.txt index 61cbbe9cf..7c49f4261 100644 --- a/test/fixtures/ruby/corpus/chained-string.parseA.txt +++ b/test/fixtures/ruby/corpus/chained-string.parseA.txt @@ -1,4 +1,7 @@ -(Statements - (Statements - (TextElement) - (TextElement))) +(Program + (Statement + (Arg + (Primary + (ChainedString + (String) + (String)))))) diff --git a/test/fixtures/ruby/corpus/class.parseA.txt b/test/fixtures/ruby/corpus/class.parseA.txt index ad9d8e46a..bbb9ac5a6 100644 --- a/test/fixtures/ruby/corpus/class.parseA.txt +++ b/test/fixtures/ruby/corpus/class.parseA.txt @@ -1,13 +1,28 @@ -(Statements - (Class - (Identifier) - (Identifier) - (Method - (Empty) - (Identifier) - (Statements))) - (Class - (ScopeResolution - (Identifier) - (Identifier)) - (Statements))) +(Program + (Statement + (Arg + (Primary + (Class + (Constant "Foo") + (Superclass + (Arg + (Primary + (Lhs + (Variable + (Constant "Super")))))) + (Statement + (Arg + (Primary + (Method + (MethodName + (Identifier "test")))))))))) + (Statement + (Arg + (Primary + (Class + (ScopeResolution + (Constant "Bar") + (Primary + (Lhs + (Variable + (Constant "Foo")))))))))) diff --git a/test/fixtures/ruby/corpus/class.parseB.txt b/test/fixtures/ruby/corpus/class.parseB.txt index 6aff83ea3..338584149 100644 --- a/test/fixtures/ruby/corpus/class.parseB.txt +++ b/test/fixtures/ruby/corpus/class.parseB.txt @@ -1,7 +1,12 @@ -(Statements - (Class - (Identifier) - (Method - (Empty) - (Identifier) - (Statements)))) +(Program + (Statement + (Arg + (Primary + (Class + (Constant "Foo") + (Statement + (Arg + (Primary + (Method + (MethodName + (Identifier "test"))))))))))) diff --git a/test/fixtures/ruby/corpus/comment.parseA.txt b/test/fixtures/ruby/corpus/comment.parseA.txt index 4568b6b78..0b05546cd 100644 --- a/test/fixtures/ruby/corpus/comment.parseA.txt +++ b/test/fixtures/ruby/corpus/comment.parseA.txt @@ -1,4 +1 @@ -(Statements - (Context - (Comment) - (Empty))) +(Program) diff --git a/test/fixtures/ruby/corpus/comment.parseB.txt b/test/fixtures/ruby/corpus/comment.parseB.txt index 4568b6b78..0b05546cd 100644 --- a/test/fixtures/ruby/corpus/comment.parseB.txt +++ b/test/fixtures/ruby/corpus/comment.parseB.txt @@ -1,4 +1 @@ -(Statements - (Context - (Comment) - (Empty))) +(Program) diff --git a/test/fixtures/ruby/corpus/comparision-operator.parseA.txt b/test/fixtures/ruby/corpus/comparision-operator.parseA.txt index 6db4d3ba2..38dde10df 100644 --- a/test/fixtures/ruby/corpus/comparision-operator.parseA.txt +++ b/test/fixtures/ruby/corpus/comparision-operator.parseA.txt @@ -1,11 +1,27 @@ -(Statements - (LessThan - (Send - (Identifier)) - (Send - (Identifier))) - (GreaterThan - (Send - (Identifier)) - (Send - (Identifier)))) +(Program + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "x"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "y"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b")))))))) diff --git a/test/fixtures/ruby/corpus/comparision-operator.parseB.txt b/test/fixtures/ruby/corpus/comparision-operator.parseB.txt index c01a2cd30..38dde10df 100644 --- a/test/fixtures/ruby/corpus/comparision-operator.parseB.txt +++ b/test/fixtures/ruby/corpus/comparision-operator.parseB.txt @@ -1,11 +1,27 @@ -(Statements - (LessThanEqual - (Send - (Identifier)) - (Send - (Identifier))) - (GreaterThanEqual - (Send - (Identifier)) - (Send - (Identifier)))) +(Program + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "x"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "y"))))))) + (Statement + (Binary + (Token) + (Arg + (Primary + (Lhs + (Variable + (Identifier "a"))))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "b")))))))) diff --git a/test/fixtures/ruby/corpus/conditional-assignment.parseA.txt b/test/fixtures/ruby/corpus/conditional-assignment.parseA.txt index 3d24a1c09..7179a5145 100644 --- a/test/fixtures/ruby/corpus/conditional-assignment.parseA.txt +++ b/test/fixtures/ruby/corpus/conditional-assignment.parseA.txt @@ -1,5 +1,9 @@ -(Statements - (AugmentedAssignment - (Or - (Identifier) - (Integer)))) +(Program + (Statement + (OperatorAssignment + (Lhs + (Variable + (Identifier "x"))) + (Arg + (Primary + (Integer "5")))))) diff --git a/test/fixtures/ruby/corpus/conditional-assignment.parseB.txt b/test/fixtures/ruby/corpus/conditional-assignment.parseB.txt index 7a6797bdf..a268694bf 100644 --- a/test/fixtures/ruby/corpus/conditional-assignment.parseB.txt +++ b/test/fixtures/ruby/corpus/conditional-assignment.parseB.txt @@ -1,5 +1,9 @@ -(Statements - (AugmentedAssignment - (And - (Identifier) - (Integer)))) +(Program + (Statement + (OperatorAssignment + (Lhs + (Variable + (Identifier "x"))) + (Arg + (Primary + (Integer "7")))))) diff --git a/test/fixtures/ruby/corpus/delimiter.parseA.txt b/test/fixtures/ruby/corpus/delimiter.parseA.txt index 0709fbb9e..83ecd389c 100644 --- a/test/fixtures/ruby/corpus/delimiter.parseA.txt +++ b/test/fixtures/ruby/corpus/delimiter.parseA.txt @@ -1,7 +1,25 @@ -(Statements - (TextElement) - (TextElement) - (TextElement) - (TextElement) - (TextElement) - (TextElement)) +(Program + (Statement + (Arg + (Primary + (String)))) + (Statement + (Arg + (Primary + (String)))) + (Statement + (Arg + (Primary + (String)))) + (Statement + (Arg + (Primary + (String)))) + (Statement + (Arg + (Primary + (String)))) + (Statement + (Arg + (Primary + (String))))) diff --git a/test/fixtures/ruby/corpus/delimiter.parseB.txt b/test/fixtures/ruby/corpus/delimiter.parseB.txt index 0709fbb9e..83ecd389c 100644 --- a/test/fixtures/ruby/corpus/delimiter.parseB.txt +++ b/test/fixtures/ruby/corpus/delimiter.parseB.txt @@ -1,7 +1,25 @@ -(Statements - (TextElement) - (TextElement) - (TextElement) - (TextElement) - (TextElement) - (TextElement)) +(Program + (Statement + (Arg + (Primary + (String)))) + (Statement + (Arg + (Primary + (String)))) + (Statement + (Arg + (Primary + (String)))) + (Statement + (Arg + (Primary + (String)))) + (Statement + (Arg + (Primary + (String)))) + (Statement + (Arg + (Primary + (String))))) diff --git a/test/fixtures/ruby/corpus/element-reference.parseA.txt b/test/fixtures/ruby/corpus/element-reference.parseA.txt index 05cbedc13..1d2f690f8 100644 --- a/test/fixtures/ruby/corpus/element-reference.parseA.txt +++ b/test/fixtures/ruby/corpus/element-reference.parseA.txt @@ -1,17 +1,43 @@ -(Statements - (Subscript - (Send - (Identifier)) - (Send - (Identifier))) - (Subscript - (Send - (Identifier)) - (SymbolElement)) - (Assignment - (Subscript - (Send - (Identifier)) - (Send - (Identifier))) - (Integer))) +(Program + (Statement + (Arg + (Primary + (Lhs + (ElementReference + (Primary + (Lhs + (Variable + (Identifier "foo")))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "bar")))))))))) + (Statement + (Arg + (Primary + (Lhs + (ElementReference + (Primary + (Lhs + (Variable + (Identifier "foo")))) + (Arg + (Primary + (Symbol)))))))) + (Statement + (Assignment + (Lhs + (ElementReference + (Primary + (Lhs + (Variable + (Identifier "foo")))) + (Arg + (Primary + (Lhs + (Variable + (Identifier "bar"))))))) + (Arg + (Primary + (Integer "1")))))) diff --git a/test/fixtures/ruby/corpus/element-reference.parseB.txt b/test/fixtures/ruby/corpus/element-reference.parseB.txt index f3afa9d5d..7ffc3d4c5 100644 --- a/test/fixtures/ruby/corpus/element-reference.parseB.txt +++ b/test/fixtures/ruby/corpus/element-reference.parseB.txt @@ -1,9 +1,25 @@ -(Statements - (Subscript - (Send - (Identifier)) - (TextElement)) - (Subscript - (Send - (Identifier)) - (SymbolElement))) +(Program + (Statement + (Arg + (Primary + (Lhs + (ElementReference + (Primary + (Lhs + (Variable + (Identifier "x")))) + (Arg + (Primary + (String)))))))) + (Statement + (Arg + (Primary + (Lhs + (ElementReference + (Primary + (Lhs + (Variable + (Identifier "x")))) + (Arg + (Primary + (Symbol))))))))) diff --git a/test/fixtures/ruby/corpus/else.parseA.txt b/test/fixtures/ruby/corpus/else.parseA.txt index 142cb9e55..b35ee2a5c 100644 --- a/test/fixtures/ruby/corpus/else.parseA.txt +++ b/test/fixtures/ruby/corpus/else.parseA.txt @@ -1,8 +1,11 @@ -(Statements - (Try - (Statements - (Send - (Identifier)) - (Else - (Empty) - (Statements))))) +(Program + (Statement + (Arg + (Primary + (Begin + (Statement + (MethodCall + (ArgumentList) + (Variable + (Identifier "foo")))) + (Else)))))) diff --git a/test/fixtures/ruby/corpus/else.parseB.txt b/test/fixtures/ruby/corpus/else.parseB.txt index ba36aecf1..833554ccf 100644 --- a/test/fixtures/ruby/corpus/else.parseB.txt +++ b/test/fixtures/ruby/corpus/else.parseB.txt @@ -1,9 +1,16 @@ -(Statements - (Try - (Statements - (Send - (Identifier)) - (Else - (Empty) - (Send - (Identifier)))))) +(Program + (Statement + (Arg + (Primary + (Begin + (Statement + (MethodCall + (ArgumentList) + (Variable + (Identifier "foo")))) + (Else + (Statement + (MethodCall + (ArgumentList) + (Variable + (Identifier "bar")))))))))) diff --git a/test/fixtures/ruby/corpus/elsif.parseA.txt b/test/fixtures/ruby/corpus/elsif.parseA.txt index ca6b3d606..772c6ebc0 100644 --- a/test/fixtures/ruby/corpus/elsif.parseA.txt +++ b/test/fixtures/ruby/corpus/elsif.parseA.txt @@ -1,12 +1,24 @@ -(Statements - (If - (Send - (Identifier)) - (Statements - (Send - (Identifier))) - (If - (Send - (Identifier)) - (Statements) - (Empty)))) +(Program + (Statement + (Arg + (Primary + (If + (Elsif + (Statement + (Arg + (Primary + (Lhs + (Variable + (Identifier "baz"))))))) + (Then + (Statement + (MethodCall + (ArgumentList) + (Variable + (Identifier "foo"))))) + (Statement + (Arg + (Primary + (Lhs + (Variable + (Identifier "bar"))))))))))) diff --git a/test/fixtures/ruby/corpus/elsif.parseB.txt b/test/fixtures/ruby/corpus/elsif.parseB.txt index bb1e52af4..a766562f5 100644 --- a/test/fixtures/ruby/corpus/elsif.parseB.txt +++ b/test/fixtures/ruby/corpus/elsif.parseB.txt @@ -1,14 +1,30 @@ -(Statements - (If - (Send - (Identifier)) - (Statements - (Send - (Identifier))) - (If - (Send - (Identifier)) - (Statements - (Send - (Identifier))) - (Empty)))) +(Program + (Statement + (Arg + (Primary + (If + (Elsif + (Then + (Statement + (MethodCall + (ArgumentList) + (Variable + (Identifier "qoz"))))) + (Statement + (Arg + (Primary + (Lhs + (Variable + (Identifier "baz"))))))) + (Then + (Statement + (MethodCall + (ArgumentList) + (Variable + (Identifier "foo"))))) + (Statement + (Arg + (Primary + (Lhs + (Variable + (Identifier "bar"))))))))))) diff --git a/test/fixtures/ruby/corpus/empty-statement.parseA.txt b/test/fixtures/ruby/corpus/empty-statement.parseA.txt index 04eca4c77..04d0dd4fa 100644 --- a/test/fixtures/ruby/corpus/empty-statement.parseA.txt +++ b/test/fixtures/ruby/corpus/empty-statement.parseA.txt @@ -1,2 +1,2 @@ -(Statements - (Empty)) +(Program + (EmptyStatement ";")) diff --git a/test/fixtures/ruby/corpus/end-block.parseA.txt b/test/fixtures/ruby/corpus/end-block.parseA.txt index 919071711..38556adb5 100644 --- a/test/fixtures/ruby/corpus/end-block.parseA.txt +++ b/test/fixtures/ruby/corpus/end-block.parseA.txt @@ -1,4 +1,9 @@ -(Statements - (ScopeExit - (Send - (Identifier)))) +(Program + (Statement + (EndBlock + (Statement + (Arg + (Primary + (Lhs + (Variable + (Identifier "foo"))))))))) diff --git a/test/fixtures/ruby/corpus/end-block.parseB.txt b/test/fixtures/ruby/corpus/end-block.parseB.txt index 53f70e1cd..12baa2238 100644 --- a/test/fixtures/ruby/corpus/end-block.parseB.txt +++ b/test/fixtures/ruby/corpus/end-block.parseB.txt @@ -1,6 +1,15 @@ -(Statements - (Send - (Identifier)) - (ScopeExit - (Send - (Identifier)))) +(Program + (Statement + (Arg + (Primary + (Lhs + (Variable + (Identifier "foo")))))) + (Statement + (EndBlock + (Statement + (Arg + (Primary + (Lhs + (Variable + (Identifier "bar"))))))))) diff --git a/test/fixtures/ruby/corpus/ensure.parseA.txt b/test/fixtures/ruby/corpus/ensure.parseA.txt index a454eb984..f6f048a87 100644 --- a/test/fixtures/ruby/corpus/ensure.parseA.txt +++ b/test/fixtures/ruby/corpus/ensure.parseA.txt @@ -1,7 +1,12 @@ -(Statements - (Try - (Statements - (Send - (Identifier)) - (Finally - (Statements))))) +(Program + (Statement + (Arg + (Primary + (Begin + (Statement + (Arg + (Primary + (Lhs + (Variable + (Identifier "foo")))))) + (Ensure)))))) diff --git a/test/fixtures/ruby/corpus/ensure.parseB.txt b/test/fixtures/ruby/corpus/ensure.parseB.txt index 449aef23a..e4eeb90c8 100644 --- a/test/fixtures/ruby/corpus/ensure.parseB.txt +++ b/test/fixtures/ruby/corpus/ensure.parseB.txt @@ -1,8 +1,18 @@ -(Statements - (Try - (Statements - (Send - (Identifier)) - (Finally - (Send - (Identifier)))))) +(Program + (Statement + (Arg + (Primary + (Begin + (Statement + (Arg + (Primary + (Lhs + (Variable + (Identifier "foo")))))) + (Ensure + (Statement + (Arg + (Primary + (Lhs + (Variable + (Identifier "bar")))))))))))) diff --git a/test/fixtures/ruby/corpus/for.parseA.txt b/test/fixtures/ruby/corpus/for.parseA.txt index dd475f04b..496e55953 100644 --- a/test/fixtures/ruby/corpus/for.parseA.txt +++ b/test/fixtures/ruby/corpus/for.parseA.txt @@ -1,39 +1,91 @@ -(Statements - (ForEach - (Statements - (Send - (Identifier))) - (Send - (Identifier)) - (Send - (Identifier))) - (ForEach - (Statements - (Send - (Identifier)) - (Send - (Identifier))) - (Send - (Identifier)) - (Send - (Identifier))) - (ForEach - (Statements - (Send - (Identifier))) - (Enumeration - (Integer) - (Integer) - (Empty)) - (Boolean)) - (ForEach - (Statements - (Send - (Identifier)) - (Send - (Identifier))) - (Enumeration - (Integer) - (Integer) - (Empty)) - (Boolean))) +(Program + (Statement + (Arg + (Primary + (For + (Lhs + (Variable + (Identifier "x"))) + (Do + (Statement + (Arg + (Primary + (Lhs + (Variable + (Identifier "f"))))))) + (In + (Arg + (Primary + (Lhs + (Variable + (Identifier "y")))))))))) + (Statement + (Arg + (Primary + (For + (Lhs + (Variable + (Identifier "x"))) + (Lhs + (Variable + (Identifier "y"))) + (Do + (Statement + (Arg + (Primary + (Lhs + (Variable + (Identifier "f"))))))) + (In + (Arg + (Primary + (Lhs + (Variable + (Identifier "z")))))))))) + (Statement + (Arg + (Primary + (For + (Lhs + (Variable + (Identifier "n"))) + (Do + (Statement + (Arg + (Primary + (Lhs + (True "true")))))) + (In + (Arg + (Range + (Arg + (Primary + (Integer "1"))) + (Arg + (Primary + (Integer "3")))))))))) + (Statement + (Arg + (Primary + (For + (Lhs + (Variable + (Identifier "n"))) + (Lhs + (Variable + (Identifier "m"))) + (Do + (Statement + (Arg + (Primary + (Lhs + (True "true")))))) + (In + (Arg + (Range + (Arg + (Primary + (Integer "1"))) + (Arg + (Primary + (Integer "3"))))))))))) diff --git a/test/fixtures/ruby/corpus/for.parseB.txt b/test/fixtures/ruby/corpus/for.parseB.txt index 267b02aa0..ce3bfa182 100644 --- a/test/fixtures/ruby/corpus/for.parseB.txt +++ b/test/fixtures/ruby/corpus/for.parseB.txt @@ -1,13 +1,32 @@ -(Statements - (ForEach - (Statements - (Send - (Identifier))) - (Array - (Integer) - (Integer) - (Integer)) - (Send - (Identifier) - (Send - (Identifier))))) +(Program + (Statement + (Arg + (Primary + (For + (Lhs + (Variable + (Identifier "i"))) + (Do + (Statement + (MethodCall + (ArgumentList + (Arg + (Primary + (Lhs + (Variable + (Identifier "i")))))) + (Variable + (Identifier "print"))))) + (In + (Arg + (Primary + (Array + (Arg + (Primary + (Integer "1"))) + (Arg + (Primary + (Integer "2"))) + (Arg + (Primary + (Integer "3")))))))))))) diff --git a/test/fixtures/ruby/corpus/hash.parseA.txt b/test/fixtures/ruby/corpus/hash.parseA.txt index ce5412404..33bbffa65 100644 --- a/test/fixtures/ruby/corpus/hash.parseA.txt +++ b/test/fixtures/ruby/corpus/hash.parseA.txt @@ -1,34 +1,48 @@ -(Statements - (Hash - (KeyValue - (SymbolElement) - (TextElement)) - (KeyValue - (SymbolElement) - (Integer)) - (KeyValue - (TextElement) - (Boolean)) - (KeyValue - (SymbolElement) - (Integer))) - (Hash) - (Hash - (Context - (Comment) - (KeyValue - (SymbolElement) - (Integer))) - (Context - (Comment) - (Comment) - (KeyValue - (TextElement) - (Integer))) - (Context - (Comment) - (Empty))) - (Hash - (Context - (Comment) - (Empty)))) +(Program + (Statement + (Arg + (Primary + (Hash + (Pair + (Arg + (Primary + (String))) + (Symbol)) + (Pair + (Arg + (Primary + (Integer "1"))) + (Symbol)) + (Pair + (Arg + (Primary + (Lhs + (False "false")))) + (String)) + (Pair + (Arg + (Primary + (Integer "10"))) + (Symbol)))))) + (Statement + (Arg + (Primary + (Hash)))) + (Statement + (Arg + (Primary + (Hash + (Pair + (Arg + (Primary + (Integer "1"))) + (Symbol)) + (Pair + (Arg + (Primary + (Integer "1"))) + (String)))))) + (Statement + (Arg + (Primary + (Hash))))) diff --git a/test/fixtures/ruby/corpus/hash.parseB.txt b/test/fixtures/ruby/corpus/hash.parseB.txt index 2c5ace52e..21d47159f 100644 --- a/test/fixtures/ruby/corpus/hash.parseB.txt +++ b/test/fixtures/ruby/corpus/hash.parseB.txt @@ -1,11 +1,21 @@ -(Statements - (Hash - (KeyValue - (SymbolElement) - (TextElement)) - (KeyValue - (SymbolElement) - (Integer)) - (KeyValue - (SymbolElement) - (Boolean)))) +(Program + (Statement + (Arg + (Primary + (Hash + (Pair + (Arg + (Primary + (String))) + (Symbol)) + (Pair + (Arg + (Primary + (Integer "2"))) + (Symbol)) + (Pair + (Arg + (Primary + (Lhs + (True "true")))) + (Symbol))))))) diff --git a/test/fixtures/ruby/corpus/heredoc.parseA.txt b/test/fixtures/ruby/corpus/heredoc.parseA.txt index 2609a9d5e..e2867bee1 100644 --- a/test/fixtures/ruby/corpus/heredoc.parseA.txt +++ b/test/fixtures/ruby/corpus/heredoc.parseA.txt @@ -1,4 +1,5 @@ -(Statements - (TextElement) - (Statements - (TextElement))) +(Program + (Statement + (Arg + (Primary + (HeredocBeginning "<