Module: AST::Sexp

Defined in:
lib/bel_parser/vendor/ast/sexp.rb,
lib/bel_parser/parsers/ast/sexp.rb

Overview

Override to return BELParser::Parsers::AST::Node from Sexp shortcut.

Instance Method Summary collapse

Instance Method Details

#s(type, *children) ⇒ Object

Creates a Node with type ‘type` and children `children`. Note that the resulting node is of the type AST::Node and not a subclass. This would not pose a problem with comparisons, as Node#== ignores metadata.



26
27
28
# File 'lib/bel_parser/vendor/ast/sexp.rb', line 26

def s(type, *children)
  Node.new(type, children)
end