[ruby/prism] Update whitequark tests

https://github.com/ruby/prism/commit/95e2484903
This commit is contained in:
Kevin Newton 2024-06-03 13:42:14 -04:00 коммит произвёл git
Родитель 77581dd45b
Коммит 91ee58ee48
5 изменённых файлов: 206 добавлений и 441 удалений

Просмотреть файл

@ -0,0 +1,7 @@
while def foo a = tap do end; end; break; end
while def foo; tap do end; end; break; end
while def self.foo a = tap do end; end; break; end
while def self.foo; tap do end; end; break; end

Просмотреть файл

@ -1,195 +0,0 @@
@ ProgramNode (location: (1,0)-(11,17))
├── locals: []
└── statements:
@ StatementsNode (location: (1,0)-(11,17))
└── body: (length: 6)
├── @ CallNode (location: (1,0)-(1,14))
│ ├── flags: ignore_visibility
│ ├── receiver: ∅
│ ├── call_operator_loc: ∅
│ ├── name: :fun
│ ├── message_loc: (1,0)-(1,3) = "fun"
│ ├── opening_loc: (1,3)-(1,4) = "("
│ ├── arguments:
│ │ @ ArgumentsNode (location: (1,4)-(1,13))
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (1,4)-(1,13))
│ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (1,4)-(1,13))
│ │ ├── key:
│ │ │ @ SymbolNode (location: (1,4)-(1,8))
│ │ │ ├── flags: forced_us_ascii_encoding
│ │ │ ├── opening_loc: (1,4)-(1,5) = ":"
│ │ │ ├── value_loc: (1,5)-(1,8) = "foo"
│ │ │ ├── closing_loc: ∅
│ │ │ └── unescaped: "foo"
│ │ ├── value:
│ │ │ @ IntegerNode (location: (1,12)-(1,13))
│ │ │ ├── flags: decimal
│ │ │ └── value: 1
│ │ └── operator_loc: (1,9)-(1,11) = "=>"
│ ├── closing_loc: (1,13)-(1,14) = ")"
│ └── block: ∅
├── @ CallNode (location: (3,0)-(3,19))
│ ├── flags: ignore_visibility
│ ├── receiver: ∅
│ ├── call_operator_loc: ∅
│ ├── name: :fun
│ ├── message_loc: (3,0)-(3,3) = "fun"
│ ├── opening_loc: (3,3)-(3,4) = "("
│ ├── arguments:
│ │ @ ArgumentsNode (location: (3,4)-(3,13))
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (3,4)-(3,13))
│ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (3,4)-(3,13))
│ │ ├── key:
│ │ │ @ SymbolNode (location: (3,4)-(3,8))
│ │ │ ├── flags: forced_us_ascii_encoding
│ │ │ ├── opening_loc: (3,4)-(3,5) = ":"
│ │ │ ├── value_loc: (3,5)-(3,8) = "foo"
│ │ │ ├── closing_loc: ∅
│ │ │ └── unescaped: "foo"
│ │ ├── value:
│ │ │ @ IntegerNode (location: (3,12)-(3,13))
│ │ │ ├── flags: decimal
│ │ │ └── value: 1
│ │ └── operator_loc: (3,9)-(3,11) = "=>"
│ ├── closing_loc: (3,19)-(3,20) = ")"
│ └── block:
│ @ BlockArgumentNode (location: (3,15)-(3,19))
│ ├── expression:
│ │ @ CallNode (location: (3,16)-(3,19))
│ │ ├── flags: variable_call, ignore_visibility
│ │ ├── receiver: ∅
│ │ ├── call_operator_loc: ∅
│ │ ├── name: :baz
│ │ ├── message_loc: (3,16)-(3,19) = "baz"
│ │ ├── opening_loc: ∅
│ │ ├── arguments: ∅
│ │ ├── closing_loc: ∅
│ │ └── block: ∅
│ └── operator_loc: (3,15)-(3,16) = "&"
├── @ CallNode (location: (5,0)-(5,21))
│ ├── flags: ignore_visibility
│ ├── receiver:
│ │ @ SelfNode (location: (5,0)-(5,4))
│ ├── call_operator_loc: (5,4)-(5,5) = "."
│ ├── name: :[]=
│ ├── message_loc: (5,5)-(5,8) = "[]="
│ ├── opening_loc: ∅
│ ├── arguments:
│ │ @ ArgumentsNode (location: (5,9)-(5,21))
│ │ ├── flags: ∅
│ │ └── arguments: (length: 2)
│ │ ├── @ CallNode (location: (5,9)-(5,12))
│ │ │ ├── flags: variable_call, ignore_visibility
│ │ │ ├── receiver: ∅
│ │ │ ├── call_operator_loc: ∅
│ │ │ ├── name: :foo
│ │ │ ├── message_loc: (5,9)-(5,12) = "foo"
│ │ │ ├── opening_loc: ∅
│ │ │ ├── arguments: ∅
│ │ │ ├── closing_loc: ∅
│ │ │ └── block: ∅
│ │ └── @ KeywordHashNode (location: (5,14)-(5,21))
│ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (5,14)-(5,21))
│ │ ├── key:
│ │ │ @ SymbolNode (location: (5,14)-(5,16))
│ │ │ ├── flags: forced_us_ascii_encoding
│ │ │ ├── opening_loc: (5,14)-(5,15) = ":"
│ │ │ ├── value_loc: (5,15)-(5,16) = "a"
│ │ │ ├── closing_loc: ∅
│ │ │ └── unescaped: "a"
│ │ ├── value:
│ │ │ @ IntegerNode (location: (5,20)-(5,21))
│ │ │ ├── flags: decimal
│ │ │ └── value: 1
│ │ └── operator_loc: (5,17)-(5,19) = "=>"
│ ├── closing_loc: ∅
│ └── block: ∅
├── @ CallNode (location: (7,0)-(7,15))
│ ├── flags: ignore_visibility
│ ├── receiver:
│ │ @ SelfNode (location: (7,0)-(7,4))
│ ├── call_operator_loc: ∅
│ ├── name: :[]
│ ├── message_loc: (7,4)-(7,15) = "[:bar => 1]"
│ ├── opening_loc: (7,4)-(7,5) = "["
│ ├── arguments:
│ │ @ ArgumentsNode (location: (7,5)-(7,14))
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (7,5)-(7,14))
│ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (7,5)-(7,14))
│ │ ├── key:
│ │ │ @ SymbolNode (location: (7,5)-(7,9))
│ │ │ ├── flags: forced_us_ascii_encoding
│ │ │ ├── opening_loc: (7,5)-(7,6) = ":"
│ │ │ ├── value_loc: (7,6)-(7,9) = "bar"
│ │ │ ├── closing_loc: ∅
│ │ │ └── unescaped: "bar"
│ │ ├── value:
│ │ │ @ IntegerNode (location: (7,13)-(7,14))
│ │ │ ├── flags: decimal
│ │ │ └── value: 1
│ │ └── operator_loc: (7,10)-(7,12) = "=>"
│ ├── closing_loc: (7,14)-(7,15) = "]"
│ └── block: ∅
├── @ SuperNode (location: (9,0)-(9,17))
│ ├── keyword_loc: (9,0)-(9,5) = "super"
│ ├── lparen_loc: (9,5)-(9,6) = "("
│ ├── arguments:
│ │ @ ArgumentsNode (location: (9,6)-(9,16))
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (9,6)-(9,16))
│ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (9,6)-(9,16))
│ │ ├── key:
│ │ │ @ SymbolNode (location: (9,6)-(9,10))
│ │ │ ├── flags: forced_us_ascii_encoding
│ │ │ ├── opening_loc: (9,6)-(9,7) = ":"
│ │ │ ├── value_loc: (9,7)-(9,10) = "foo"
│ │ │ ├── closing_loc: ∅
│ │ │ └── unescaped: "foo"
│ │ ├── value:
│ │ │ @ IntegerNode (location: (9,14)-(9,16))
│ │ │ ├── flags: decimal
│ │ │ └── value: 42
│ │ └── operator_loc: (9,11)-(9,13) = "=>"
│ ├── rparen_loc: (9,16)-(9,17) = ")"
│ └── block: ∅
└── @ YieldNode (location: (11,0)-(11,17))
├── keyword_loc: (11,0)-(11,5) = "yield"
├── lparen_loc: (11,5)-(11,6) = "("
├── arguments:
│ @ ArgumentsNode (location: (11,6)-(11,16))
│ ├── flags: ∅
│ └── arguments: (length: 1)
│ └── @ KeywordHashNode (location: (11,6)-(11,16))
│ ├── flags: symbol_keys
│ └── elements: (length: 1)
│ └── @ AssocNode (location: (11,6)-(11,16))
│ ├── key:
│ │ @ SymbolNode (location: (11,6)-(11,10))
│ │ ├── flags: forced_us_ascii_encoding
│ │ ├── opening_loc: (11,6)-(11,7) = ":"
│ │ ├── value_loc: (11,7)-(11,10) = "foo"
│ │ ├── closing_loc: ∅
│ │ └── unescaped: "foo"
│ ├── value:
│ │ @ IntegerNode (location: (11,14)-(11,16))
│ │ ├── flags: decimal
│ │ └── value: 42
│ └── operator_loc: (11,11)-(11,13) = "=>"
└── rparen_loc: (11,16)-(11,17) = ")"

Просмотреть файл

@ -1,195 +0,0 @@
@ ProgramNode (location: (1,0)-(11,17))
├── locals: []
└── statements:
@ StatementsNode (location: (1,0)-(11,17))
└── body: (length: 6)
├── @ CallNode (location: (1,0)-(1,14))
│ ├── flags: ignore_visibility
│ ├── receiver: ∅
│ ├── call_operator_loc: ∅
│ ├── name: :fun
│ ├── message_loc: (1,0)-(1,3) = "fun"
│ ├── opening_loc: (1,3)-(1,4) = "("
│ ├── arguments:
│ │ @ ArgumentsNode (location: (1,4)-(1,13))
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (1,4)-(1,13))
│ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (1,4)-(1,13))
│ │ ├── key:
│ │ │ @ SymbolNode (location: (1,4)-(1,8))
│ │ │ ├── flags: forced_us_ascii_encoding
│ │ │ ├── opening_loc: (1,4)-(1,5) = ":"
│ │ │ ├── value_loc: (1,5)-(1,8) = "foo"
│ │ │ ├── closing_loc: ∅
│ │ │ └── unescaped: "foo"
│ │ ├── value:
│ │ │ @ IntegerNode (location: (1,12)-(1,13))
│ │ │ ├── flags: decimal
│ │ │ └── value: 1
│ │ └── operator_loc: (1,9)-(1,11) = "=>"
│ ├── closing_loc: (1,13)-(1,14) = ")"
│ └── block: ∅
├── @ CallNode (location: (3,0)-(3,19))
│ ├── flags: ignore_visibility
│ ├── receiver: ∅
│ ├── call_operator_loc: ∅
│ ├── name: :fun
│ ├── message_loc: (3,0)-(3,3) = "fun"
│ ├── opening_loc: (3,3)-(3,4) = "("
│ ├── arguments:
│ │ @ ArgumentsNode (location: (3,4)-(3,13))
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (3,4)-(3,13))
│ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (3,4)-(3,13))
│ │ ├── key:
│ │ │ @ SymbolNode (location: (3,4)-(3,8))
│ │ │ ├── flags: forced_us_ascii_encoding
│ │ │ ├── opening_loc: (3,4)-(3,5) = ":"
│ │ │ ├── value_loc: (3,5)-(3,8) = "foo"
│ │ │ ├── closing_loc: ∅
│ │ │ └── unescaped: "foo"
│ │ ├── value:
│ │ │ @ IntegerNode (location: (3,12)-(3,13))
│ │ │ ├── flags: decimal
│ │ │ └── value: 1
│ │ └── operator_loc: (3,9)-(3,11) = "=>"
│ ├── closing_loc: (3,19)-(3,20) = ")"
│ └── block:
│ @ BlockArgumentNode (location: (3,15)-(3,19))
│ ├── expression:
│ │ @ CallNode (location: (3,16)-(3,19))
│ │ ├── flags: variable_call, ignore_visibility
│ │ ├── receiver: ∅
│ │ ├── call_operator_loc: ∅
│ │ ├── name: :baz
│ │ ├── message_loc: (3,16)-(3,19) = "baz"
│ │ ├── opening_loc: ∅
│ │ ├── arguments: ∅
│ │ ├── closing_loc: ∅
│ │ └── block: ∅
│ └── operator_loc: (3,15)-(3,16) = "&"
├── @ CallNode (location: (5,0)-(5,21))
│ ├── flags: ignore_visibility
│ ├── receiver:
│ │ @ SelfNode (location: (5,0)-(5,4))
│ ├── call_operator_loc: (5,4)-(5,5) = "."
│ ├── name: :[]=
│ ├── message_loc: (5,5)-(5,8) = "[]="
│ ├── opening_loc: ∅
│ ├── arguments:
│ │ @ ArgumentsNode (location: (5,9)-(5,21))
│ │ ├── flags: ∅
│ │ └── arguments: (length: 2)
│ │ ├── @ CallNode (location: (5,9)-(5,12))
│ │ │ ├── flags: variable_call, ignore_visibility
│ │ │ ├── receiver: ∅
│ │ │ ├── call_operator_loc: ∅
│ │ │ ├── name: :foo
│ │ │ ├── message_loc: (5,9)-(5,12) = "foo"
│ │ │ ├── opening_loc: ∅
│ │ │ ├── arguments: ∅
│ │ │ ├── closing_loc: ∅
│ │ │ └── block: ∅
│ │ └── @ KeywordHashNode (location: (5,14)-(5,21))
│ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (5,14)-(5,21))
│ │ ├── key:
│ │ │ @ SymbolNode (location: (5,14)-(5,16))
│ │ │ ├── flags: forced_us_ascii_encoding
│ │ │ ├── opening_loc: (5,14)-(5,15) = ":"
│ │ │ ├── value_loc: (5,15)-(5,16) = "a"
│ │ │ ├── closing_loc: ∅
│ │ │ └── unescaped: "a"
│ │ ├── value:
│ │ │ @ IntegerNode (location: (5,20)-(5,21))
│ │ │ ├── flags: decimal
│ │ │ └── value: 1
│ │ └── operator_loc: (5,17)-(5,19) = "=>"
│ ├── closing_loc: ∅
│ └── block: ∅
├── @ CallNode (location: (7,0)-(7,15))
│ ├── flags: ignore_visibility
│ ├── receiver:
│ │ @ SelfNode (location: (7,0)-(7,4))
│ ├── call_operator_loc: ∅
│ ├── name: :[]
│ ├── message_loc: (7,4)-(7,15) = "[:bar => 1]"
│ ├── opening_loc: (7,4)-(7,5) = "["
│ ├── arguments:
│ │ @ ArgumentsNode (location: (7,5)-(7,14))
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (7,5)-(7,14))
│ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (7,5)-(7,14))
│ │ ├── key:
│ │ │ @ SymbolNode (location: (7,5)-(7,9))
│ │ │ ├── flags: forced_us_ascii_encoding
│ │ │ ├── opening_loc: (7,5)-(7,6) = ":"
│ │ │ ├── value_loc: (7,6)-(7,9) = "bar"
│ │ │ ├── closing_loc: ∅
│ │ │ └── unescaped: "bar"
│ │ ├── value:
│ │ │ @ IntegerNode (location: (7,13)-(7,14))
│ │ │ ├── flags: decimal
│ │ │ └── value: 1
│ │ └── operator_loc: (7,10)-(7,12) = "=>"
│ ├── closing_loc: (7,14)-(7,15) = "]"
│ └── block: ∅
├── @ SuperNode (location: (9,0)-(9,17))
│ ├── keyword_loc: (9,0)-(9,5) = "super"
│ ├── lparen_loc: (9,5)-(9,6) = "("
│ ├── arguments:
│ │ @ ArgumentsNode (location: (9,6)-(9,16))
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (9,6)-(9,16))
│ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (9,6)-(9,16))
│ │ ├── key:
│ │ │ @ SymbolNode (location: (9,6)-(9,10))
│ │ │ ├── flags: forced_us_ascii_encoding
│ │ │ ├── opening_loc: (9,6)-(9,7) = ":"
│ │ │ ├── value_loc: (9,7)-(9,10) = "foo"
│ │ │ ├── closing_loc: ∅
│ │ │ └── unescaped: "foo"
│ │ ├── value:
│ │ │ @ IntegerNode (location: (9,14)-(9,16))
│ │ │ ├── flags: decimal
│ │ │ └── value: 42
│ │ └── operator_loc: (9,11)-(9,13) = "=>"
│ ├── rparen_loc: (9,16)-(9,17) = ")"
│ └── block: ∅
└── @ YieldNode (location: (11,0)-(11,17))
├── keyword_loc: (11,0)-(11,5) = "yield"
├── lparen_loc: (11,5)-(11,6) = "("
├── arguments:
│ @ ArgumentsNode (location: (11,6)-(11,16))
│ ├── flags: ∅
│ └── arguments: (length: 1)
│ └── @ KeywordHashNode (location: (11,6)-(11,16))
│ ├── flags: symbol_keys
│ └── elements: (length: 1)
│ └── @ AssocNode (location: (11,6)-(11,16))
│ ├── key:
│ │ @ SymbolNode (location: (11,6)-(11,10))
│ │ ├── flags: forced_us_ascii_encoding
│ │ ├── opening_loc: (11,6)-(11,7) = ":"
│ │ ├── value_loc: (11,7)-(11,10) = "foo"
│ │ ├── closing_loc: ∅
│ │ └── unescaped: "foo"
│ ├── value:
│ │ @ IntegerNode (location: (11,14)-(11,16))
│ │ ├── flags: decimal
│ │ └── value: 42
│ └── operator_loc: (11,11)-(11,13) = "=>"
└── rparen_loc: (11,16)-(11,17) = ")"

Просмотреть файл

@ -0,0 +1,199 @@
@ ProgramNode (location: (1,0)-(7,47))
├── locals: []
└── statements:
@ StatementsNode (location: (1,0)-(7,47))
└── body: (length: 4)
├── @ WhileNode (location: (1,0)-(1,45))
│ ├── flags: ∅
│ ├── keyword_loc: (1,0)-(1,5) = "while"
│ ├── closing_loc: (1,42)-(1,45) = "end"
│ ├── predicate:
│ │ @ DefNode (location: (1,6)-(1,33))
│ │ ├── name: :foo
│ │ ├── name_loc: (1,10)-(1,13) = "foo"
│ │ ├── receiver: ∅
│ │ ├── parameters:
│ │ │ @ ParametersNode (location: (1,14)-(1,28))
│ │ │ ├── requireds: (length: 0)
│ │ │ ├── optionals: (length: 1)
│ │ │ │ └── @ OptionalParameterNode (location: (1,14)-(1,28))
│ │ │ │ ├── flags: ∅
│ │ │ │ ├── name: :a
│ │ │ │ ├── name_loc: (1,14)-(1,15) = "a"
│ │ │ │ ├── operator_loc: (1,16)-(1,17) = "="
│ │ │ │ └── value:
│ │ │ │ @ CallNode (location: (1,18)-(1,28))
│ │ │ │ ├── flags: ignore_visibility
│ │ │ │ ├── receiver: ∅
│ │ │ │ ├── call_operator_loc: ∅
│ │ │ │ ├── name: :tap
│ │ │ │ ├── message_loc: (1,18)-(1,21) = "tap"
│ │ │ │ ├── opening_loc: ∅
│ │ │ │ ├── arguments: ∅
│ │ │ │ ├── closing_loc: ∅
│ │ │ │ └── block:
│ │ │ │ @ BlockNode (location: (1,22)-(1,28))
│ │ │ │ ├── locals: []
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (1,22)-(1,24) = "do"
│ │ │ │ └── closing_loc: (1,25)-(1,28) = "end"
│ │ │ ├── rest: ∅
│ │ │ ├── posts: (length: 0)
│ │ │ ├── keywords: (length: 0)
│ │ │ ├── keyword_rest: ∅
│ │ │ └── block: ∅
│ │ ├── body: ∅
│ │ ├── locals: [:a]
│ │ ├── def_keyword_loc: (1,6)-(1,9) = "def"
│ │ ├── operator_loc: ∅
│ │ ├── lparen_loc: ∅
│ │ ├── rparen_loc: ∅
│ │ ├── equal_loc: ∅
│ │ └── end_keyword_loc: (1,30)-(1,33) = "end"
│ └── statements:
│ @ StatementsNode (location: (1,35)-(1,40))
│ └── body: (length: 1)
│ └── @ BreakNode (location: (1,35)-(1,40))
│ ├── arguments: ∅
│ └── keyword_loc: (1,35)-(1,40) = "break"
├── @ WhileNode (location: (3,0)-(3,42))
│ ├── flags: ∅
│ ├── keyword_loc: (3,0)-(3,5) = "while"
│ ├── closing_loc: (3,39)-(3,42) = "end"
│ ├── predicate:
│ │ @ DefNode (location: (3,6)-(3,30))
│ │ ├── name: :foo
│ │ ├── name_loc: (3,10)-(3,13) = "foo"
│ │ ├── receiver: ∅
│ │ ├── parameters: ∅
│ │ ├── body:
│ │ │ @ StatementsNode (location: (3,15)-(3,25))
│ │ │ └── body: (length: 1)
│ │ │ └── @ CallNode (location: (3,15)-(3,25))
│ │ │ ├── flags: ignore_visibility
│ │ │ ├── receiver: ∅
│ │ │ ├── call_operator_loc: ∅
│ │ │ ├── name: :tap
│ │ │ ├── message_loc: (3,15)-(3,18) = "tap"
│ │ │ ├── opening_loc: ∅
│ │ │ ├── arguments: ∅
│ │ │ ├── closing_loc: ∅
│ │ │ └── block:
│ │ │ @ BlockNode (location: (3,19)-(3,25))
│ │ │ ├── locals: []
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (3,19)-(3,21) = "do"
│ │ │ └── closing_loc: (3,22)-(3,25) = "end"
│ │ ├── locals: []
│ │ ├── def_keyword_loc: (3,6)-(3,9) = "def"
│ │ ├── operator_loc: ∅
│ │ ├── lparen_loc: ∅
│ │ ├── rparen_loc: ∅
│ │ ├── equal_loc: ∅
│ │ └── end_keyword_loc: (3,27)-(3,30) = "end"
│ └── statements:
│ @ StatementsNode (location: (3,32)-(3,37))
│ └── body: (length: 1)
│ └── @ BreakNode (location: (3,32)-(3,37))
│ ├── arguments: ∅
│ └── keyword_loc: (3,32)-(3,37) = "break"
├── @ WhileNode (location: (5,0)-(5,50))
│ ├── flags: ∅
│ ├── keyword_loc: (5,0)-(5,5) = "while"
│ ├── closing_loc: (5,47)-(5,50) = "end"
│ ├── predicate:
│ │ @ DefNode (location: (5,6)-(5,38))
│ │ ├── name: :foo
│ │ ├── name_loc: (5,15)-(5,18) = "foo"
│ │ ├── receiver:
│ │ │ @ SelfNode (location: (5,10)-(5,14))
│ │ ├── parameters:
│ │ │ @ ParametersNode (location: (5,19)-(5,33))
│ │ │ ├── requireds: (length: 0)
│ │ │ ├── optionals: (length: 1)
│ │ │ │ └── @ OptionalParameterNode (location: (5,19)-(5,33))
│ │ │ │ ├── flags: ∅
│ │ │ │ ├── name: :a
│ │ │ │ ├── name_loc: (5,19)-(5,20) = "a"
│ │ │ │ ├── operator_loc: (5,21)-(5,22) = "="
│ │ │ │ └── value:
│ │ │ │ @ CallNode (location: (5,23)-(5,33))
│ │ │ │ ├── flags: ignore_visibility
│ │ │ │ ├── receiver: ∅
│ │ │ │ ├── call_operator_loc: ∅
│ │ │ │ ├── name: :tap
│ │ │ │ ├── message_loc: (5,23)-(5,26) = "tap"
│ │ │ │ ├── opening_loc: ∅
│ │ │ │ ├── arguments: ∅
│ │ │ │ ├── closing_loc: ∅
│ │ │ │ └── block:
│ │ │ │ @ BlockNode (location: (5,27)-(5,33))
│ │ │ │ ├── locals: []
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (5,27)-(5,29) = "do"
│ │ │ │ └── closing_loc: (5,30)-(5,33) = "end"
│ │ │ ├── rest: ∅
│ │ │ ├── posts: (length: 0)
│ │ │ ├── keywords: (length: 0)
│ │ │ ├── keyword_rest: ∅
│ │ │ └── block: ∅
│ │ ├── body: ∅
│ │ ├── locals: [:a]
│ │ ├── def_keyword_loc: (5,6)-(5,9) = "def"
│ │ ├── operator_loc: (5,14)-(5,15) = "."
│ │ ├── lparen_loc: ∅
│ │ ├── rparen_loc: ∅
│ │ ├── equal_loc: ∅
│ │ └── end_keyword_loc: (5,35)-(5,38) = "end"
│ └── statements:
│ @ StatementsNode (location: (5,40)-(5,45))
│ └── body: (length: 1)
│ └── @ BreakNode (location: (5,40)-(5,45))
│ ├── arguments: ∅
│ └── keyword_loc: (5,40)-(5,45) = "break"
└── @ WhileNode (location: (7,0)-(7,47))
├── flags: ∅
├── keyword_loc: (7,0)-(7,5) = "while"
├── closing_loc: (7,44)-(7,47) = "end"
├── predicate:
│ @ DefNode (location: (7,6)-(7,35))
│ ├── name: :foo
│ ├── name_loc: (7,15)-(7,18) = "foo"
│ ├── receiver:
│ │ @ SelfNode (location: (7,10)-(7,14))
│ ├── parameters: ∅
│ ├── body:
│ │ @ StatementsNode (location: (7,20)-(7,30))
│ │ └── body: (length: 1)
│ │ └── @ CallNode (location: (7,20)-(7,30))
│ │ ├── flags: ignore_visibility
│ │ ├── receiver: ∅
│ │ ├── call_operator_loc: ∅
│ │ ├── name: :tap
│ │ ├── message_loc: (7,20)-(7,23) = "tap"
│ │ ├── opening_loc: ∅
│ │ ├── arguments: ∅
│ │ ├── closing_loc: ∅
│ │ └── block:
│ │ @ BlockNode (location: (7,24)-(7,30))
│ │ ├── locals: []
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (7,24)-(7,26) = "do"
│ │ └── closing_loc: (7,27)-(7,30) = "end"
│ ├── locals: []
│ ├── def_keyword_loc: (7,6)-(7,9) = "def"
│ ├── operator_loc: (7,14)-(7,15) = "."
│ ├── lparen_loc: ∅
│ ├── rparen_loc: ∅
│ ├── equal_loc: ∅
│ └── end_keyword_loc: (7,32)-(7,35) = "end"
└── statements:
@ StatementsNode (location: (7,37)-(7,42))
└── body: (length: 1)
└── @ BreakNode (location: (7,37)-(7,42))
├── arguments: ∅
└── keyword_loc: (7,37)-(7,42) = "break"

Просмотреть файл

@ -1,51 +0,0 @@
@ ProgramNode (location: (1,0)-(7,10))
├── locals: []
└── statements:
@ StatementsNode (location: (1,0)-(7,10))
└── body: (length: 4)
├── @ YieldNode (location: (1,0)-(1,5))
│ ├── keyword_loc: (1,0)-(1,5) = "yield"
│ ├── lparen_loc: ∅
│ ├── arguments: ∅
│ └── rparen_loc: ∅
├── @ YieldNode (location: (3,0)-(3,9))
│ ├── keyword_loc: (3,0)-(3,5) = "yield"
│ ├── lparen_loc: ∅
│ ├── arguments:
│ │ @ ArgumentsNode (location: (3,6)-(3,9))
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ CallNode (location: (3,6)-(3,9))
│ │ ├── flags: variable_call, ignore_visibility
│ │ ├── receiver: ∅
│ │ ├── call_operator_loc: ∅
│ │ ├── name: :foo
│ │ ├── message_loc: (3,6)-(3,9) = "foo"
│ │ ├── opening_loc: ∅
│ │ ├── arguments: ∅
│ │ ├── closing_loc: ∅
│ │ └── block: ∅
│ └── rparen_loc: ∅
├── @ YieldNode (location: (5,0)-(5,7))
│ ├── keyword_loc: (5,0)-(5,5) = "yield"
│ ├── lparen_loc: (5,5)-(5,6) = "("
│ ├── arguments: ∅
│ └── rparen_loc: (5,6)-(5,7) = ")"
└── @ YieldNode (location: (7,0)-(7,10))
├── keyword_loc: (7,0)-(7,5) = "yield"
├── lparen_loc: (7,5)-(7,6) = "("
├── arguments:
│ @ ArgumentsNode (location: (7,6)-(7,9))
│ ├── flags: ∅
│ └── arguments: (length: 1)
│ └── @ CallNode (location: (7,6)-(7,9))
│ ├── flags: variable_call, ignore_visibility
│ ├── receiver: ∅
│ ├── call_operator_loc: ∅
│ ├── name: :foo
│ ├── message_loc: (7,6)-(7,9) = "foo"
│ ├── opening_loc: ∅
│ ├── arguments: ∅
│ ├── closing_loc: ∅
│ └── block: ∅
└── rparen_loc: (7,9)-(7,10) = ")"