Class: Nasl::Lvalue

Inherits:
Node
  • Object
show all
Defined in:
lib/nasl/parser/lvalue.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#ctx, #tokens

Instance Method Summary collapse

Methods inherited from Node

#context, #region, #to_xml

Constructor Details

#initialize(tree, *tokens) ⇒ Lvalue

Returns a new instance of Lvalue.



33
34
35
36
37
38
39
40
41
# File 'lib/nasl/parser/lvalue.rb', line 33

def initialize(tree, *tokens)
  super

  @ident = @tokens.first
  @indexes = if @tokens.length == 2 then tokens.last else [] end

  @children << :ident
  @children << :indexes
end

Instance Attribute Details

#identObject (readonly)

Returns the value of attribute ident.



31
32
33
# File 'lib/nasl/parser/lvalue.rb', line 31

def ident
  @ident
end

#indexesObject (readonly)

Returns the value of attribute indexes.



31
32
33
# File 'lib/nasl/parser/lvalue.rb', line 31

def indexes
  @indexes
end