method
parse
v2_6_3 -
Show latest stable
- Class:
RubyVM::AbstractSyntaxTree
parse(p1)public
Parses the given string into an abstract syntax tree, returning the root node of that tree.
SyntaxError is raised if the given string is invalid syntax.
RubyVM::AbstractSyntaxTree.parse("x = 1 + 2") # => #<RubyVM::AbstractSyntaxTree::Node(NODE_SCOPE(0) 1:0, 1:9): >