Guest User

Untitled

a guest
Oct 20th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. require 'ripper'
  2. require 'pp'
  3.  
  4. pp Ripper.sexp('return if in_str == nil')
  5. puts '================'
  6. pp Ripper.sexp('return if in_str==nil')
  7. # >> [:program,
  8. # >> [[:if_mod,
  9. # >> [:binary,
  10. # >> [:vcall, [:@ident, "in_str", [1, 10]]],
  11. # >> :==,
  12. # >> [:var_ref, [:@kw, "nil", [1, 20]]]],
  13. # >> [:return0]]]]
  14. # >> ================
  15. # >> [:program,
  16. # >> [[:if_mod,
  17. # >> [:binary,
  18. # >> [:vcall, [:@ident, "in_str", [1, 10]]],
  19. # >> :==,
  20. # >> [:var_ref, [:@kw, "nil", [1, 18]]]],
  21. # >> [:return0]]]]
Add Comment
Please, Sign In to add comment