Class: Opal::AST::Node

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#metaObject (readonly)

Returns the value of attribute meta.



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

def meta
  @meta
end

Instance Method Details

#assign_properties(properties) ⇒ Object



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

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

  super
end

#columnObject



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

def column
  loc.column if loc
end

#lineObject



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

def line
  loc.line if loc
end