Class: Highway::Compiler::Analyze::Tree::Step
- Inherits:
-
Object
- Object
- Highway::Compiler::Analyze::Tree::Step
- Defined in:
- lib/highway/compiler/analyze/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 ⇒ Highway::Compiler::Analyze::Tree::Values::Hash
readonly
The hash value of step parameters.
-
#preset ⇒ String
readonly
Parent preset of the step.
-
#stage ⇒ String
readonly
Parent stage of the step.
-
#step_class ⇒ Class
readonly
Definition class of the step.
Instance Method Summary collapse
-
#initialize(index:, name:, step_class:, parameters:, preset:, stage:) ⇒ Step
constructor
Initialize an instance.
Constructor Details
#initialize(index:, name:, step_class:, parameters:, preset:, stage:) ⇒ Step
Initialize an instance.
25 26 27 28 29 30 31 32 |
# File 'lib/highway/compiler/analyze/tree/step.rb', line 25 def initialize(index:, name:, step_class:, parameters:, preset:, stage:) @index = index @name = name @step_class = step_class @parameters = parameters @preset = preset @stage = stage end |
Instance Attribute Details
#index ⇒ Integer (readonly)
Index of step in its scope.
37 38 39 |
# File 'lib/highway/compiler/analyze/tree/step.rb', line 37 def index @index end |
#name ⇒ String (readonly)
Name of the step.
42 43 44 |
# File 'lib/highway/compiler/analyze/tree/step.rb', line 42 def name @name end |
#parameters ⇒ Highway::Compiler::Analyze::Tree::Values::Hash (readonly)
The hash value of step parameters.
52 53 54 |
# File 'lib/highway/compiler/analyze/tree/step.rb', line 52 def parameters @parameters end |
#preset ⇒ String (readonly)
Parent preset of the step.
57 58 59 |
# File 'lib/highway/compiler/analyze/tree/step.rb', line 57 def preset @preset end |
#stage ⇒ String (readonly)
Parent stage of the step.
62 63 64 |
# File 'lib/highway/compiler/analyze/tree/step.rb', line 62 def stage @stage end |
#step_class ⇒ Class (readonly)
Definition class of the step.
47 48 49 |
# File 'lib/highway/compiler/analyze/tree/step.rb', line 47 def step_class @step_class end |