Class: Collie::AST::Alternative
- Inherits:
-
Object
- Object
- Collie::AST::Alternative
- Defined in:
- lib/collie/ast.rb
Overview
Alternative production for a rule
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#location ⇒ Object
Returns the value of attribute location.
-
#prec ⇒ Object
Returns the value of attribute prec.
-
#symbols ⇒ Object
Returns the value of attribute symbols.
Instance Method Summary collapse
-
#initialize(symbols: [], action: nil, prec: nil, location: nil) ⇒ Alternative
constructor
A new instance of Alternative.
Constructor Details
#initialize(symbols: [], action: nil, prec: nil, location: nil) ⇒ Alternative
Returns a new instance of Alternative.
102 103 104 105 106 107 |
# File 'lib/collie/ast.rb', line 102 def initialize(symbols: [], action: nil, prec: nil, location: nil) @symbols = symbols @action = action @prec = prec @location = location end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
100 101 102 |
# File 'lib/collie/ast.rb', line 100 def action @action end |
#location ⇒ Object
Returns the value of attribute location.
100 101 102 |
# File 'lib/collie/ast.rb', line 100 def location @location end |
#prec ⇒ Object
Returns the value of attribute prec.
100 101 102 |
# File 'lib/collie/ast.rb', line 100 def prec @prec end |
#symbols ⇒ Object
Returns the value of attribute symbols.
100 101 102 |
# File 'lib/collie/ast.rb', line 100 def symbols @symbols end |