Class: BELParser::Parsers::AST::Value

Inherits:
Node show all
Defined in:
lib/bel_parser/parsers/ast/node.rb

Overview

AST node representing a value.

Special node properties - encoding: #encoding

Instance Attribute Summary collapse

Attributes inherited from Node

#character_range, #complete, #line_number

Attributes inherited from AST::Node

#children, #hash, #type

Instance Method Summary collapse

Methods inherited from Node

#add_syntax_error, #append, #child, #children?, #complete?, #concat, #first_child, #fourth_child, #freeze, #incomplete?, #num_children, #range_end, #range_start, #second_child, #syntax_errors, #third_child, #traverse, #updated

Methods inherited from AST::Node

#==, #append, #concat, #dup, #eql?, #inspect, #to_a, #to_ast, #to_sexp, #updated

Constructor Details

#initialize(children = [], properties = {}) ⇒ Value

New Value AST node.



925
926
927
# File 'lib/bel_parser/parsers/ast/node.rb', line 925

def initialize(children = [], properties = {})
  super(Value.ast_type, children, properties)
end

Instance Attribute Details

#encodingObject

Get/Set the value’s encoding.



933
934
935
# File 'lib/bel_parser/parsers/ast/node.rb', line 933

def encoding
  @encoding
end

#namespaceObject

Get/Set the value’s namespace.



936
937
938
# File 'lib/bel_parser/parsers/ast/node.rb', line 936

def namespace
  @namespace
end

#namespace_valueObject

Get/Set the value from the purported namespace.



939
940
941
# File 'lib/bel_parser/parsers/ast/node.rb', line 939

def namespace_value
  @namespace_value
end

#prefixObject

Get/Set the namespace prefix.



930
931
932
# File 'lib/bel_parser/parsers/ast/node.rb', line 930

def prefix
  @prefix
end