Class: Stark::Parser::AST::Struct

Inherits:
Node
  • Object
show all
Defined in:
lib/stark/ast.rb,
lib/stark/raw_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, name, fields) ⇒ Struct

Returns a new instance of Struct.



490
491
492
493
494
# File 'lib/stark/raw_parser.rb', line 490

def initialize(type, name, fields)
  @type = type
  @name = name
  @fields = fields
end

Instance Attribute Details

#fieldsObject (readonly)

Returns the value of attribute fields.



497
498
499
# File 'lib/stark/raw_parser.rb', line 497

def fields
  @fields
end

#nameObject (readonly)

Returns the value of attribute name.



496
497
498
# File 'lib/stark/raw_parser.rb', line 496

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



495
496
497
# File 'lib/stark/raw_parser.rb', line 495

def type
  @type
end

Instance Method Details

#accept(obj) ⇒ Object



18
19
20
# File 'lib/stark/ast.rb', line 18

def accept(obj)
  obj.process_struct self
end