Class: Stone::AST
- Inherits:
-
Object
- Object
- Stone::AST
- Defined in:
- lib/stone/ast.rb,
lib/stone/ast/block.rb,
lib/stone/ast/lambda.rb,
lib/stone/ast/reference.rb,
lib/stone/ast/expression.rb,
lib/stone/ast/null_literal.rb,
lib/stone/ast/program_unit.rb,
lib/stone/ast/function_call.rb,
lib/stone/ast/string_literal.rb,
lib/stone/ast/type_reference.rb,
lib/stone/ast/boolean_literal.rb,
lib/stone/ast/integer_literal.rb,
lib/stone/ast/property_access.rb,
lib/stone/ast/type_annotation.rb,
lib/stone/ast/type_declaration.rb,
lib/stone/ast/record_definition.rb,
lib/stone/ast/type_of_expression.rb,
lib/stone/ast/constant_definition.rb,
lib/stone/ast/record_instantiation.rb,
lib/stone/ast/two_phase_processing.rb,
lib/stone/ast/union_type_annotation.rb,
lib/stone/ast/function_type_annotation.rb,
lib/stone/ast/program_unit/top_function.rb,
lib/stone/ast/computed_property_definition.rb
Direct Known Subclasses
ComputedPropertyDefinition, Expression, FunctionTypeAnnotation, ProgramUnit, TypeAnnotation, TypeDeclaration, UnionTypeAnnotation
Defined Under Namespace
Modules: FieldHelpers, RecordHelpers, TwoPhaseProcessing, TypeResolver Classes: Block, BooleanLiteral, ComputedPropertyDefinition, ConstantDefinition, Expression, FunctionCall, FunctionTypeAnnotation, IntegerLiteral, Lambda, NullLiteral, ProgramUnit, PropertyAccess, RecordDefinition, RecordInstantiation, Reference, StringLiteral, TypeAnnotation, TypeDeclaration, TypeOfExpression, TypeReference, UnionTypeAnnotation
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, children = nil) ⇒ AST
constructor
A new instance of AST.
Constructor Details
#initialize(name, children = nil) ⇒ AST
6 7 8 9 |
# File 'lib/stone/ast.rb', line 6 def initialize(name, children = nil) @name = name @children = children end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
4 5 6 |
# File 'lib/stone/ast.rb', line 4 def children @children end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/stone/ast.rb', line 4 def name @name end |