Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
158 changes: 100 additions & 58 deletions snapshots/for.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@ ProgramNode (location: (1,0)-(27,3))
@ ProgramNode (location: (1,0)-(29,25))
├── flags: ∅
├── locals: [:i, :j, :k, :a, :b, :c, :d]
├── locals: [:i, :j, :k, :a, :b, :c, :d, :x]
└── statements:
@ StatementsNode (location: (1,0)-(27,3))
@ StatementsNode (location: (1,0)-(29,25))
├── flags: ∅
└── body: (length: 8)
└── body: (length: 9)
├── @ ForNode (location: (1,0)-(3,3))
│ ├── flags: newline
│ ├── index:
Expand Down Expand Up @@ -270,64 +270,106 @@
│ ├── in_keyword_loc: (21,14)-(21,16) = "in"
│ ├── do_keyword_loc: ∅
│ └── end_keyword_loc: (23,0)-(23,3) = "end"
└── @ ForNode (location: (25,0)-(27,3))
├── @ ForNode (location: (25,0)-(27,3))
│ ├── flags: newline
│ ├── index:
│ │ @ MultiTargetNode (location: (25,4)-(25,17))
│ │ ├── flags: ∅
│ │ ├── lefts: (length: 1)
│ │ │ └── @ MultiTargetNode (location: (25,4)-(25,10))
│ │ │ ├── flags: ∅
│ │ │ ├── lefts: (length: 2)
│ │ │ │ ├── @ LocalVariableTargetNode (location: (25,5)-(25,6))
│ │ │ │ │ ├── flags: ∅
│ │ │ │ │ ├── name: :a
│ │ │ │ │ └── depth: 0
│ │ │ │ └── @ LocalVariableTargetNode (location: (25,8)-(25,9))
│ │ │ │ ├── flags: ∅
│ │ │ │ ├── name: :b
│ │ │ │ └── depth: 0
│ │ │ ├── rest: ∅
│ │ │ ├── rights: (length: 0)
│ │ │ ├── lparen_loc: (25,4)-(25,5) = "("
│ │ │ └── rparen_loc: (25,9)-(25,10) = ")"
│ │ ├── rest:
│ │ │ @ SplatNode (location: (25,12)-(25,14))
│ │ │ ├── flags: ∅
│ │ │ ├── operator_loc: (25,12)-(25,13) = "*"
│ │ │ └── expression:
│ │ │ @ LocalVariableTargetNode (location: (25,13)-(25,14))
│ │ │ ├── flags: ∅
│ │ │ ├── name: :c
│ │ │ └── depth: 0
│ │ ├── rights: (length: 1)
│ │ │ └── @ LocalVariableTargetNode (location: (25,16)-(25,17))
│ │ │ ├── flags: ∅
│ │ │ ├── name: :d
│ │ │ └── depth: 0
│ │ ├── lparen_loc: ∅
│ │ └── rparen_loc: ∅
│ ├── collection:
│ │ @ RangeNode (location: (25,21)-(25,26))
│ │ ├── flags: static_literal
│ │ ├── left:
│ │ │ @ IntegerNode (location: (25,21)-(25,22))
│ │ │ ├── flags: static_literal, decimal
│ │ │ └── value: 1
│ │ ├── right:
│ │ │ @ IntegerNode (location: (25,24)-(25,26))
│ │ │ ├── flags: static_literal, decimal
│ │ │ └── value: 10
│ │ └── operator_loc: (25,22)-(25,24) = ".."
│ ├── statements:
│ │ @ StatementsNode (location: (26,0)-(26,1))
│ │ ├── flags: ∅
│ │ └── body: (length: 1)
│ │ └── @ LocalVariableReadNode (location: (26,0)-(26,1))
│ │ ├── flags: newline
│ │ ├── name: :i
│ │ └── depth: 0
│ ├── for_keyword_loc: (25,0)-(25,3) = "for"
│ ├── in_keyword_loc: (25,18)-(25,20) = "in"
│ ├── do_keyword_loc: ∅
│ └── end_keyword_loc: (27,0)-(27,3) = "end"
└── @ ForNode (location: (29,0)-(29,25))
├── flags: newline
├── index:
│ @ MultiTargetNode (location: (25,4)-(25,17))
│ @ LocalVariableTargetNode (location: (29,4)-(29,5))
│ ├── flags: ∅
│ ├── lefts: (length: 1)
│ │ └── @ MultiTargetNode (location: (25,4)-(25,10))
│ │ ├── flags: ∅
│ │ ├── lefts: (length: 2)
│ │ │ ├── @ LocalVariableTargetNode (location: (25,5)-(25,6))
│ │ │ │ ├── flags: ∅
│ │ │ │ ├── name: :a
│ │ │ │ └── depth: 0
│ │ │ └── @ LocalVariableTargetNode (location: (25,8)-(25,9))
│ │ │ ├── flags: ∅
│ │ │ ├── name: :b
│ │ │ └── depth: 0
│ │ ├── rest: ∅
│ │ ├── rights: (length: 0)
│ │ ├── lparen_loc: (25,4)-(25,5) = "("
│ │ └── rparen_loc: (25,9)-(25,10) = ")"
│ ├── rest:
│ │ @ SplatNode (location: (25,12)-(25,14))
│ │ ├── flags: ∅
│ │ ├── operator_loc: (25,12)-(25,13) = "*"
│ │ └── expression:
│ │ @ LocalVariableTargetNode (location: (25,13)-(25,14))
│ │ ├── flags: ∅
│ │ ├── name: :c
│ │ └── depth: 0
│ ├── rights: (length: 1)
│ │ └── @ LocalVariableTargetNode (location: (25,16)-(25,17))
│ │ ├── flags: ∅
│ │ ├── name: :d
│ │ └── depth: 0
│ ├── lparen_loc: ∅
│ └── rparen_loc: ∅
│ ├── name: :x
│ └── depth: 0
├── collection:
│ @ RangeNode (location: (25,21)-(25,26))
│ ├── flags: static_literal
│ ├── left:
│ │ @ IntegerNode (location: (25,21)-(25,22))
│ │ ├── flags: static_literal, decimal
│ │ └── value: 1
│ ├── right:
│ │ @ IntegerNode (location: (25,24)-(25,26))
│ │ ├── flags: static_literal, decimal
│ │ └── value: 10
│ └── operator_loc: (25,22)-(25,24) = ".."
│ @ MatchPredicateNode (location: (29,9)-(29,16))
│ ├── flags: ∅
│ ├── value:
│ │ @ LocalVariableReadNode (location: (29,9)-(29,10))
│ │ ├── flags: ∅
│ │ ├── name: :a
│ │ └── depth: 0
│ ├── pattern:
│ │ @ ArrayPatternNode (location: (29,14)-(29,16))
│ │ ├── flags: ∅
│ │ ├── constant: ∅
│ │ ├── requireds: (length: 1)
│ │ │ └── @ LocalVariableTargetNode (location: (29,14)-(29,15))
│ │ │ ├── flags: ∅
│ │ │ ├── name: :b
│ │ │ └── depth: 0
│ │ ├── rest:
│ │ │ @ ImplicitRestNode (location: (29,15)-(29,16))
│ │ │ └── flags: ∅
│ │ ├── posts: (length: 0)
│ │ ├── opening_loc: ∅
│ │ └── closing_loc: ∅
│ └── operator_loc: (29,11)-(29,13) = "in"
├── statements:
│ @ StatementsNode (location: (26,0)-(26,1))
│ @ StatementsNode (location: (29,20)-(29,21))
│ ├── flags: ∅
│ └── body: (length: 1)
│ └── @ LocalVariableReadNode (location: (26,0)-(26,1))
│ ├── flags: newline
│ ├── name: :i
│ └── depth: 0
├── for_keyword_loc: (25,0)-(25,3) = "for"
├── in_keyword_loc: (25,18)-(25,20) = "in"
├── do_keyword_loc: ∅
└── end_keyword_loc: (27,0)-(27,3) = "end"
│ └── @ IntegerNode (location: (29,20)-(29,21))
│ ├── flags: newline, static_literal, decimal
│ └── value: 1
├── for_keyword_loc: (29,0)-(29,3) = "for"
├── in_keyword_loc: (29,6)-(29,8) = "in"
├── do_keyword_loc: (29,17)-(29,19) = "do"
└── end_keyword_loc: (29,22)-(29,25) = "end"
99 changes: 71 additions & 28 deletions snapshots/until.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@ ProgramNode (location: (1,0)-(13,20))
@ ProgramNode (location: (1,0)-(15,22))
├── flags: ∅
├── locals: [:baz]
├── locals: [:baz, :b]
└── statements:
@ StatementsNode (location: (1,0)-(13,20))
@ StatementsNode (location: (1,0)-(15,22))
├── flags: ∅
└── body: (length: 7)
└── body: (length: 8)
├── @ UntilNode (location: (1,0)-(1,18))
│ ├── flags: newline
│ ├── keyword_loc: (1,0)-(1,5) = "until"
Expand Down Expand Up @@ -172,44 +172,87 @@
│ ├── closing_loc: ∅
│ ├── equal_loc: ∅
│ └── block: ∅
└── @ WhileNode (location: (13,0)-(13,20))
├── @ WhileNode (location: (13,0)-(13,20))
│ ├── flags: newline
│ ├── keyword_loc: (13,4)-(13,9) = "while"
│ ├── do_keyword_loc: ∅
│ ├── closing_loc: ∅
│ ├── predicate:
│ │ @ MatchPredicateNode (location: (13,10)-(13,20))
│ │ ├── flags: ∅
│ │ ├── value:
│ │ │ @ CallNode (location: (13,10)-(13,13))
│ │ │ ├── flags: variable_call, ignore_visibility
│ │ │ ├── receiver: ∅
│ │ │ ├── call_operator_loc: ∅
│ │ │ ├── name: :bar
│ │ │ ├── message_loc: (13,10)-(13,13) = "bar"
│ │ │ ├── opening_loc: ∅
│ │ │ ├── arguments: ∅
│ │ │ ├── closing_loc: ∅
│ │ │ ├── equal_loc: ∅
│ │ │ └── block: ∅
│ │ ├── pattern:
│ │ │ @ LocalVariableTargetNode (location: (13,17)-(13,20))
│ │ │ ├── flags: ∅
│ │ │ ├── name: :baz
│ │ │ └── depth: 0
│ │ └── operator_loc: (13,14)-(13,16) = "in"
│ └── statements:
│ @ StatementsNode (location: (13,0)-(13,3))
│ ├── flags: ∅
│ └── body: (length: 1)
│ └── @ CallNode (location: (13,0)-(13,3))
│ ├── flags: newline, variable_call, ignore_visibility
│ ├── receiver: ∅
│ ├── call_operator_loc: ∅
│ ├── name: :foo
│ ├── message_loc: (13,0)-(13,3) = "foo"
│ ├── opening_loc: ∅
│ ├── arguments: ∅
│ ├── closing_loc: ∅
│ ├── equal_loc: ∅
│ └── block: ∅
└── @ UntilNode (location: (15,0)-(15,22))
├── flags: newline
├── keyword_loc: (13,4)-(13,9) = "while"
├── do_keyword_loc:
├── closing_loc:
├── keyword_loc: (15,0)-(15,5) = "until"
├── do_keyword_loc: (15,14)-(15,16) = "do"
├── closing_loc: (15,19)-(15,22) = "end"
├── predicate:
│ @ MatchPredicateNode (location: (13,10)-(13,20))
│ @ MatchPredicateNode (location: (15,6)-(15,13))
│ ├── flags: ∅
│ ├── value:
│ │ @ CallNode (location: (13,10)-(13,13))
│ │ @ CallNode (location: (15,6)-(15,7))
│ │ ├── flags: variable_call, ignore_visibility
│ │ ├── receiver: ∅
│ │ ├── call_operator_loc: ∅
│ │ ├── name: :bar
│ │ ├── message_loc: (13,10)-(13,13) = "bar"
│ │ ├── name: :a
│ │ ├── message_loc: (15,6)-(15,7) = "a"
│ │ ├── opening_loc: ∅
│ │ ├── arguments: ∅
│ │ ├── closing_loc: ∅
│ │ ├── equal_loc: ∅
│ │ └── block: ∅
│ ├── pattern:
│ │ @ LocalVariableTargetNode (location: (13,17)-(13,20))
│ │ @ ArrayPatternNode (location: (15,11)-(15,13))
│ │ ├── flags: ∅
│ │ ├── name: :baz
│ │ └── depth: 0
│ └── operator_loc: (13,14)-(13,16) = "in"
│ │ ├── constant: ∅
│ │ ├── requireds: (length: 1)
│ │ │ └── @ LocalVariableTargetNode (location: (15,11)-(15,12))
│ │ │ ├── flags: ∅
│ │ │ ├── name: :b
│ │ │ └── depth: 0
│ │ ├── rest:
│ │ │ @ ImplicitRestNode (location: (15,12)-(15,13))
│ │ │ └── flags: ∅
│ │ ├── posts: (length: 0)
│ │ ├── opening_loc: ∅
│ │ └── closing_loc: ∅
│ └── operator_loc: (15,8)-(15,10) = "in"
└── statements:
@ StatementsNode (location: (13,0)-(13,3))
@ StatementsNode (location: (15,17)-(15,18))
├── flags: ∅
└── body: (length: 1)
└── @ CallNode (location: (13,0)-(13,3))
├── flags: newline, variable_call, ignore_visibility
├── receiver: ∅
├── call_operator_loc: ∅
├── name: :foo
├── message_loc: (13,0)-(13,3) = "foo"
├── opening_loc: ∅
├── arguments: ∅
├── closing_loc: ∅
├── equal_loc: ∅
└── block: ∅
└── @ IntegerNode (location: (15,17)-(15,18))
├── flags: newline, static_literal, decimal
└── value: 1
Loading