Class: Opal::AST::Node

Inherits:
Parser::AST::Node
  • Object
show all
Defined in:
opal/lib/opal/ast/node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#metaObject (readonly)

Returns the value of attribute meta



8
9
10
# File 'opal/lib/opal/ast/node.rb', line 8

def meta
  @meta
end

Instance Method Details

#assign_properties(properties) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'opal/lib/opal/ast/node.rb', line 10

def assign_properties(properties)
  if meta = properties[:meta]
    meta = meta.dup if meta.frozen?
    @meta.merge!(meta)
  else
    @meta ||= {}
  end

  super
end

#columnObject



25
26
27
# File 'opal/lib/opal/ast/node.rb', line 25

def column
  loc.column if loc
end

#lineObject



21
22
23
# File 'opal/lib/opal/ast/node.rb', line 21

def line
  loc.line if loc
end