Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'ripper'
- require 'pp'
- pp Ripper.sexp('return if in_str == nil')
- puts '================'
- pp Ripper.sexp('return if in_str==nil')
- # >> [:program,
- # >> [[:if_mod,
- # >> [:binary,
- # >> [:vcall, [:@ident, "in_str", [1, 10]]],
- # >> :==,
- # >> [:var_ref, [:@kw, "nil", [1, 20]]]],
- # >> [:return0]]]]
- # >> ================
- # >> [:program,
- # >> [[:if_mod,
- # >> [:binary,
- # >> [:vcall, [:@ident, "in_str", [1, 10]]],
- # >> :==,
- # >> [:var_ref, [:@kw, "nil", [1, 18]]]],
- # >> [:return0]]]]
Add Comment
Please, Sign In to add comment