ParseTree
ParseTree is a C extension (using RubyInline) that extracts the parse tree for an entire class or a specific method and returns it as a s-expression (aka sexp) using ruby's arrays, strings, symbols, and integers. As an example: def conditional1(arg1) if arg1 == 0 then return 1 end return 0 end becomes: [:defn, :conditional1, [:scope, [:block, [:args, :arg1], [:if, [:call, [:lvar, :arg1], :==, [:array, [:lit, 0]]], [:return, [:lit, 1]], nil], [:return, [:lit, 0]]]]]
Ecosystem
gem.coop
gem.coop
Latest Release
almost 14 years ago
3.0.9
almost 14 years ago
Versions
42
42
Downloads
531,465 total
531,465 total
Loading...
Readme
Loading...
Links
| Registry | gem.coop |
| Source | Repository |
| Docs | Documentation |
| JSON API | View JSON |
| CodeMeta | codemeta.json |
Package Details
| PURL |
pkg:gem/ParseTree?repository_url=https://gem.coop
spec |
| License | |
| First Release | over 16 years ago |
| Last Synced | 1 day ago |
Rankings on gem.coop
Overall
Top 1.6%
Downloads
Top 4.1%
Docker downloads
Top 2.5%