Class: Synthra::Parser::AST::ArrayTypeNode
- Defined in:
- lib/synthra/parser/ast.rb
Overview
Array type node
Represents an array type with element type and size specification. Extends TypeNode with array-specific attributes.
Instance Attribute Summary collapse
-
#element_type ⇒ Object
readonly
Returns the value of attribute element_type.
-
#size_range ⇒ Object
readonly
Returns the value of attribute size_range.
Instance Method Summary collapse
-
#initialize(element_type:, size_range:, nullable: false, line: nil) ⇒ ArrayTypeNode
constructor
Create a new ArrayTypeNode.
Constructor Details
#initialize(element_type:, size_range:, nullable: false, line: nil) ⇒ ArrayTypeNode
Create a new ArrayTypeNode
648 649 650 651 652 653 654 655 656 657 |
# File 'lib/synthra/parser/ast.rb', line 648 def initialize(element_type:, size_range:, nullable: false, line: nil) super( name: "array", arguments: { element: element_type, size: size_range }, nullable: nullable, line: line ) @element_type = element_type @size_range = size_range end |
Instance Attribute Details
#element_type ⇒ Object (readonly)
Returns the value of attribute element_type.
632 633 634 |
# File 'lib/synthra/parser/ast.rb', line 632 def element_type @element_type end |
#size_range ⇒ Object (readonly)
Returns the value of attribute size_range.
638 639 640 |
# File 'lib/synthra/parser/ast.rb', line 638 def size_range @size_range end |