Ruby Code

Ripper S-expression

# Ripper.sexp_raw(...) =>

[:program,
 [:stmts_add,
  [:stmts_add,
   [:stmts_add,
    [:stmts_add,
     [:stmts_add,
      [:stmts_add,
       [:stmts_add, [:stmts_new], [:vcall, [:@ident, "a", [1, 0]]]],
       [:var_ref, [:@gvar, "$a", [2, 0]]]],
      [:var_ref, [:@const, "A", [3, 0]]]],
     [:var_ref, [:@ivar, "@a", [4, 0]]]],
    [:var_ref, [:@cvar, "@@a", [5, 0]]]],
   [:method_add_arg, [:fcall, [:@ident, "a", [8, 0]]], [:arg_paren, nil]]],
  [:call, [:var_ref, [:@kw, "self", [9, 0]]], :".", [:@ident, "a", [9, 5]]]]]

Graph Structure

Ruby version: 2.5.0, Source Code: GitHub.