diff options
Diffstat (limited to 'test/prism/snapshots/unparser/corpus/semantic/literal.txt')
-rw-r--r-- | test/prism/snapshots/unparser/corpus/semantic/literal.txt | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/test/prism/snapshots/unparser/corpus/semantic/literal.txt b/test/prism/snapshots/unparser/corpus/semantic/literal.txt new file mode 100644 index 0000000000..ef666890be --- /dev/null +++ b/test/prism/snapshots/unparser/corpus/semantic/literal.txt @@ -0,0 +1,103 @@ +@ ProgramNode (location: (1,0)-(14,10)) +├── locals: [] +└── statements: + @ StatementsNode (location: (1,0)-(14,10)) + └── body: (length: 14) + ├── @ RationalNode (location: (1,0)-(1,4)) + │ └── numeric: + │ @ FloatNode (location: (1,0)-(1,3)) + │ └── value: 1.0 + ├── @ RationalNode (location: (2,0)-(2,3)) + │ └── numeric: + │ @ IntegerNode (location: (2,0)-(2,2)) + │ ├── flags: decimal + │ └── value: 0 + ├── @ IntegerNode (location: (3,0)-(3,3)) + │ ├── flags: hexadecimal + │ └── value: 1 + ├── @ IntegerNode (location: (4,0)-(4,5)) + │ ├── flags: decimal + │ └── value: 1000 + ├── @ FloatNode (location: (5,0)-(5,4)) + │ └── value: 10000000000.0 + ├── @ FloatNode (location: (6,0)-(6,14)) + │ └── value: Infinity + ├── @ FloatNode (location: (7,0)-(7,15)) + │ └── value: -Infinity + ├── @ StringNode (location: (8,0)-(8,2)) + │ ├── flags: ∅ + │ ├── opening_loc: (8,0)-(8,1) = "?" + │ ├── content_loc: (8,1)-(8,2) = "c" + │ ├── closing_loc: ∅ + │ └── unescaped: "c" + ├── @ RegularExpressionNode (location: (9,0)-(9,5)) + │ ├── flags: forced_us_ascii_encoding + │ ├── opening_loc: (9,0)-(9,3) = "%r(" + │ ├── content_loc: (9,3)-(9,4) = "/" + │ ├── closing_loc: (9,4)-(9,5) = ")" + │ └── unescaped: "/" + ├── @ RegularExpressionNode (location: (10,0)-(10,6)) + │ ├── flags: forced_us_ascii_encoding + │ ├── opening_loc: (10,0)-(10,3) = "%r(" + │ ├── content_loc: (10,3)-(10,5) = "\\)" + │ ├── closing_loc: (10,5)-(10,6) = ")" + │ └── unescaped: "\\)" + ├── @ InterpolatedRegularExpressionNode (location: (11,0)-(11,14)) + │ ├── flags: ∅ + │ ├── opening_loc: (11,0)-(11,3) = "%r(" + │ ├── parts: (length: 2) + │ │ ├── @ EmbeddedStatementsNode (location: (11,3)-(11,10)) + │ │ │ ├── opening_loc: (11,3)-(11,5) = "\#{" + │ │ │ ├── statements: + │ │ │ │ @ StatementsNode (location: (11,5)-(11,9)) + │ │ │ │ └── body: (length: 1) + │ │ │ │ └── @ InstanceVariableReadNode (location: (11,5)-(11,9)) + │ │ │ │ └── name: :@bar + │ │ │ └── closing_loc: (11,9)-(11,10) = "}" + │ │ └── @ StringNode (location: (11,10)-(11,13)) + │ │ ├── flags: frozen + │ │ ├── opening_loc: ∅ + │ │ ├── content_loc: (11,10)-(11,13) = "baz" + │ │ ├── closing_loc: ∅ + │ │ └── unescaped: "baz" + │ └── closing_loc: (11,13)-(11,14) = ")" + ├── @ FloatNode (location: (12,0)-(12,16)) + │ └── value: Infinity + ├── @ FloatNode (location: (13,0)-(13,17)) + │ └── value: -Infinity + └── @ CallNode (location: (14,0)-(14,10)) + ├── flags: ignore_visibility + ├── receiver: ∅ + ├── call_operator_loc: ∅ + ├── name: :w + ├── message_loc: (14,0)-(14,1) = "w" + ├── opening_loc: (14,1)-(14,2) = "(" + ├── arguments: + │ @ ArgumentsNode (location: (14,2)-(14,9)) + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ CallNode (location: (14,2)-(14,9)) + │ ├── flags: ignore_visibility + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :foo + │ ├── message_loc: (14,2)-(14,5) = "foo" + │ ├── opening_loc: ∅ + │ ├── arguments: + │ │ @ ArgumentsNode (location: (14,6)-(14,9)) + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ CallNode (location: (14,6)-(14,9)) + │ │ ├── flags: variable_call, ignore_visibility + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :bar + │ │ ├── message_loc: (14,6)-(14,9) = "bar" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ ├── closing_loc: ∅ + │ └── block: ∅ + ├── closing_loc: (14,9)-(14,10) = ")" + └── block: ∅ |