Skip to content

Instantly share code, notes, and snippets.

@baweaver
Created December 27, 2019 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baweaver/9fcfbd07ba86a0f7e34b638bcdf6e7b9 to your computer and use it in GitHub Desktop.
Save baweaver/9fcfbd07ba86a0f7e34b638bcdf6e7b9 to your computer and use it in GitHub Desktop.
# Original Code
hash = { something: 'fun' }
method_called(with, some, hash)
# AST
(begin
(lvasgn :hash
(hash
(pair
(sym :something)
(str "fun"))))
(send nil :method_called
(send nil :with)
(send nil :some)
(lvar :hash)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment