Class: Highway::Compiler::Parse::Tree::Step
- Inherits:
-
Object
- Object
- Highway::Compiler::Parse::Tree::Step
- Defined in:
- lib/highway/compiler/parse/tree/step.rb
Overview
This class represents a step node in a parse tree. It contains information about a single step and its parameters.
Instance Attribute Summary collapse
-
#index ⇒ Integer
readonly
Index of step in its scope.
-
#name ⇒ String
readonly
Name of the step.
-
#parameters ⇒ Hash
readonly
Parameters of the step.
-
#preset ⇒ String
readonly
Parent preset of the step.
-
#stage ⇒ String
readonly
Parent stage of the step.
Instance Method Summary collapse
-
#initialize(index:, name:, parameters:, preset:, stage:) ⇒ Step
constructor
Initialize an instance.
Constructor Details
#initialize(index:, name:, parameters:, preset:, stage:) ⇒ Step
Initialize an instance.
24 25 26 27 28 29 30 |
# File 'lib/highway/compiler/parse/tree/step.rb', line 24 def initialize(index:, name:, parameters:, preset:, stage:) @name = name @parameters = parameters @preset = preset @stage = stage @index = index end |
Instance Attribute Details
#index ⇒ Integer (readonly)
Index of step in its scope.
55 56 57 |
# File 'lib/highway/compiler/parse/tree/step.rb', line 55 def index @index end |
#name ⇒ String (readonly)
Name of the step.
35 36 37 |
# File 'lib/highway/compiler/parse/tree/step.rb', line 35 def name @name end |
#parameters ⇒ Hash (readonly)
Parameters of the step.
40 41 42 |
# File 'lib/highway/compiler/parse/tree/step.rb', line 40 def parameters @parameters end |
#preset ⇒ String (readonly)
Parent preset of the step.
45 46 47 |
# File 'lib/highway/compiler/parse/tree/step.rb', line 45 def preset @preset end |
#stage ⇒ String (readonly)
Parent stage of the step.
50 51 52 |
# File 'lib/highway/compiler/parse/tree/step.rb', line 50 def stage @stage end |