module BELParser::Parsers::AST::Sexp

Sexp defines a module that creates {BELParser::Parsers::AST::Node AST nodes} using S-expression syntax.

@see en.wikipedia.org/wiki/S-expression S-expression

Public Class Methods

build(&block) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 976
def self.build(&block)
  raise ArgumentError, 'expecting block' unless block_given?

  builder = _builder_class.new
  builder.instance_eval(&block)
end

Private Class Methods

_builder_class() click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 983
def self._builder_class
  Class.new do
    include Sexp
  end
end

Public Instance Methods

annotation_definition(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1090
def annotation_definition(*children, **props)
  AnnotationDefinition.new(children, props)
end
argument(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1026
def argument(*children, **props)
  Argument.new(children, props)
end
blank_line() click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1074
def blank_line
  BlankLine.new([], complete: true)
end
comment(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1066
def comment(*children, **props)
  Comment.new(children, props)
end
comment_line(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1070
def comment_line(*children, **props)
  CommentLine.new(children, props)
end
document_property(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1086
def document_property(*children, **props)
  DocumentProperty.new(children, props)
end
domain(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1102
def domain(*children, **props)
  Domain.new(children, props)
end
function(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1022
def function(*children, **props)
  Function.new(children, props)
end
identifier(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1046
def identifier(*children, **props)
  Identifier.new(children, props)
end
keyword(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1098
def keyword(*children, **props)
  Keyword.new(children, props)
end
list(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1058
def list(*children, **props)
  List.new(children, props)
end
list_item(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1062
def list_item(*children, **props)
  ListItem.new(children, props)
end
multi_identifier(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1050
def multi_identifier(*children, **props)
  MultiIdentifier.new(children, props)
end
name(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1038
def name(*children, **props)
  Name.new(children, props)
end
namespace_definition(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1094
def namespace_definition(*children, **props)
  NamespaceDefinition.new(children, props)
end
nested_statement(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 990
def nested_statement(*children, **props)
  NestedStatement.new(children, props)
end
object(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1010
def object(*children, **props)
  Object.new(children, props)
end
observed_term(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 998
def observed_term(*children, **props)
  ObservedTerm.new(children, props)
end
parameter(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1030
def parameter(*children, **props)
  Parameter.new(children, props)
end
pattern(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1114
def pattern(*children, **props)
  Pattern.new(children, props)
end
prefix(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1034
def prefix(*children, **props)
  Prefix.new(children, props)
end
relationship(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1014
def relationship(*children, **props)
  Relationship.new(children, props)
end
set(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1078
def set(*children, **props)
  Set.new(children, props)
end
simple_statement(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 994
def simple_statement(*children, **props)
  SimpleStatement.new(children, props)
end
statement(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1002
def statement(*children, **props)
  Statement.new(children, props)
end
string(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1054
def string(*children, **props)
  String.new(children, props)
end
subject(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1006
def subject(*children, **props)
  Subject.new(children, props)
end
term(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1018
def term(*children, **props)
  Term.new(children, props)
end
unset(*children) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1082
def unset(*children)
  Unset.new(children)
end
uri(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1110
def uri(*children, **props)
  Uri.new(children, props)
end
url(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1106
def url(*children, **props)
  Url.new(children, props)
end
value(*children, **props) click to toggle source
# File lib/bel_parser/parsers/ast/node.rb, line 1042
def value(*children, **props)
  Value.new(children, props)
end