@ ProgramNode (location: (1,0)-(3,24)) ├── locals: [] └── statements: @ StatementsNode (location: (1,0)-(3,24)) └── body: (length: 2) ├── @ DefNode (location: (1,0)-(1,18)) │ ├── name: :f │ ├── name_loc: (1,4)-(1,5) = "f" │ ├── receiver: ∅ │ ├── parameters: │ │ @ ParametersNode (location: (1,6)-(1,13)) │ │ ├── requireds: (length: 0) │ │ ├── optionals: (length: 1) │ │ │ └── @ OptionalParameterNode (location: (1,6)-(1,13)) │ │ │ ├── flags: ∅ │ │ │ ├── name: :foo │ │ │ ├── name_loc: (1,6)-(1,9) = "foo" │ │ │ ├── operator_loc: (1,10)-(1,11) = "=" │ │ │ └── value: │ │ │ @ IntegerNode (location: (1,12)-(1,13)) │ │ │ ├── flags: decimal │ │ │ └── value: 1 │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 0) │ │ ├── keyword_rest: ∅ │ │ └── block: ∅ │ ├── body: ∅ │ ├── locals: [:foo] │ ├── def_keyword_loc: (1,0)-(1,3) = "def" │ ├── operator_loc: ∅ │ ├── lparen_loc: ∅ │ ├── rparen_loc: ∅ │ ├── equal_loc: ∅ │ └── end_keyword_loc: (1,15)-(1,18) = "end" └── @ DefNode (location: (3,0)-(3,24)) ├── name: :f ├── name_loc: (3,4)-(3,5) = "f" ├── receiver: ∅ ├── parameters: │ @ ParametersNode (location: (3,6)-(3,18)) │ ├── requireds: (length: 0) │ ├── optionals: (length: 2) │ │ ├── @ OptionalParameterNode (location: (3,6)-(3,11)) │ │ │ ├── flags: ∅ │ │ │ ├── name: :foo │ │ │ ├── name_loc: (3,6)-(3,9) = "foo" │ │ │ ├── operator_loc: (3,9)-(3,10) = "=" │ │ │ └── value: │ │ │ @ IntegerNode (location: (3,10)-(3,11)) │ │ │ ├── flags: decimal │ │ │ └── value: 1 │ │ └── @ OptionalParameterNode (location: (3,13)-(3,18)) │ │ ├── flags: ∅ │ │ ├── name: :bar │ │ ├── name_loc: (3,13)-(3,16) = "bar" │ │ ├── operator_loc: (3,16)-(3,17) = "=" │ │ └── value: │ │ @ IntegerNode (location: (3,17)-(3,18)) │ │ ├── flags: decimal │ │ └── value: 2 │ ├── rest: ∅ │ ├── posts: (length: 0) │ ├── keywords: (length: 0) │ ├── keyword_rest: ∅ │ └── block: ∅ ├── body: ∅ ├── locals: [:foo, :bar] ├── def_keyword_loc: (3,0)-(3,3) = "def" ├── operator_loc: ∅ ├── lparen_loc: (3,5)-(3,6) = "(" ├── rparen_loc: (3,18)-(3,19) = ")" ├── equal_loc: ∅ └── end_keyword_loc: (3,21)-(3,24) = "end"