Class: Highway::Compiler::Analyze::Tree::Stage

Inherits:
Object
  • Object
show all
Defined in:
lib/highway/compiler/analyze/tree/stage.rb

Overview

This class represents a stage note in the semantic tree. It contains information about stage order and execution policy.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(index:, name:, policy:) ⇒ Stage

Initialize an instance.

Parameters:

  • index (Integer)

    Index of the stage.

  • name (String)

    Name of the stage.

  • policy (Symbol)

    Execution policy of the stage.



22
23
24
25
26
# File 'lib/highway/compiler/analyze/tree/stage.rb', line 22

def initialize(index:, name:, policy:)
  @index = index
  @name = name
  @policy = policy
end

Instance Attribute Details

#indexInteger (readonly)

Index of the stage.

Returns:

  • (Integer)


31
32
33
# File 'lib/highway/compiler/analyze/tree/stage.rb', line 31

def index
  @index
end

#nameString (readonly)

Name of the stage.

Returns:

  • (String)


36
37
38
# File 'lib/highway/compiler/analyze/tree/stage.rb', line 36

def name
  @name
end

#policySymbol (readonly)

Execution policy of the stage.

Returns:

  • (Symbol)


41
42
43
# File 'lib/highway/compiler/analyze/tree/stage.rb', line 41

def policy
  @policy
end