Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

S-H-GAMELINKS
Copy link
Contributor

memo:

> ruby -e 's = 117' --parser=prism --dump=parsetree
@ ProgramNode (location: (1,0)-(1,7))
+-- locals: [:s]
+-- statements:
    @ StatementsNode (location: (1,0)-(1,7))
    +-- body: (length: 1)
        +-- @ LocalVariableWriteNode (location: (1,0)-(1,7))
            +-- name: :s
            +-- depth: 0
            +-- name_loc: (1,0)-(1,1) = "s"
            +-- value:
            |   @ IntegerNode (location: (1,4)-(1,7))
            |   +-- IntegerBaseFlags: decimal
            |   +-- value: 117
            +-- operator_loc: (1,2)-(1,3) = "="

memo:
```bash
> ruby -e 's = 117' --parser=prism --dump=parsetree
@ ProgramNode (location: (1,0)-(1,7))
+-- locals: [:s]
+-- statements:
    @ StatementsNode (location: (1,0)-(1,7))
    +-- body: (length: 1)
        +-- @ LocalVariableWriteNode (location: (1,0)-(1,7))
            +-- name: :s
            +-- depth: 0
            +-- name_loc: (1,0)-(1,1) = "s"
            +-- value:
            |   @ IntegerNode (location: (1,4)-(1,7))
            |   +-- IntegerBaseFlags: decimal
            |   +-- value: 117
            +-- operator_loc: (1,2)-(1,3) = "="
```
@S-H-GAMELINKS S-H-GAMELINKS force-pushed the add-location-to-node-lasgn branch from 241ed55 to 4efc917 Compare September 24, 2025 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant