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.



487
488
489
490
491
# File 'lib/stark/raw_parser.rb', line 487

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

Instance Attribute Details

#fieldsObject (readonly)

Returns the value of attribute fields.



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

def fields
  @fields
end

#nameObject (readonly)

Returns the value of attribute name.



493
494
495
# File 'lib/stark/raw_parser.rb', line 493

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



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

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