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.
-
#empty_marker ⇒ Object
Returns the value of attribute empty_marker.
-
#explicit_empty ⇒ Object
Returns the value of attribute explicit_empty.
-
#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, explicit_empty: false, empty_marker: nil, location: nil) ⇒ Alternative
constructor
A new instance of Alternative.
Constructor Details
#initialize(symbols: [], action: nil, prec: nil, explicit_empty: false, empty_marker: nil, location: nil) ⇒ Alternative
Returns a new instance of Alternative.
112 113 114 115 116 117 118 119 |
# File 'lib/collie/ast.rb', line 112 def initialize(symbols: [], action: nil, prec: nil, explicit_empty: false, empty_marker: nil, location: nil) @symbols = symbols @action = action @prec = prec @explicit_empty = explicit_empty @empty_marker = empty_marker @location = location end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
110 111 112 |
# File 'lib/collie/ast.rb', line 110 def action @action end |
#empty_marker ⇒ Object
Returns the value of attribute empty_marker.
110 111 112 |
# File 'lib/collie/ast.rb', line 110 def empty_marker @empty_marker end |
#explicit_empty ⇒ Object
Returns the value of attribute explicit_empty.
110 111 112 |
# File 'lib/collie/ast.rb', line 110 def explicit_empty @explicit_empty end |
#location ⇒ Object
Returns the value of attribute location.
110 111 112 |
# File 'lib/collie/ast.rb', line 110 def location @location end |
#prec ⇒ Object
Returns the value of attribute prec.
110 111 112 |
# File 'lib/collie/ast.rb', line 110 def prec @prec end |
#symbols ⇒ Object
Returns the value of attribute symbols.
110 111 112 |
# File 'lib/collie/ast.rb', line 110 def symbols @symbols end |