Class: Postscript::Model::UnknownOperator
- Defined in:
- lib/postscript/model/operators.rb
Overview
Wrapper for operator tokens with no registered class. Carries the original keyword so the visitor can emit a comment / warn.
Instance Attribute Summary collapse
-
#keyword ⇒ Object
readonly
Returns the value of attribute keyword.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(keyword:) ⇒ UnknownOperator
constructor
A new instance of UnknownOperator.
- #visit_name ⇒ Object
Methods inherited from Operator
#accept, #operator?, register_as
Constructor Details
#initialize(keyword:) ⇒ UnknownOperator
Returns a new instance of UnknownOperator.
62 63 64 65 |
# File 'lib/postscript/model/operators.rb', line 62 def initialize(keyword:) @keyword = keyword freeze end |
Instance Attribute Details
#keyword ⇒ Object (readonly)
Returns the value of attribute keyword.
60 61 62 |
# File 'lib/postscript/model/operators.rb', line 60 def keyword @keyword end |
Class Method Details
.from_operands(_stack) ⇒ Object
69 |
# File 'lib/postscript/model/operators.rb', line 69 def self.from_operands(_stack); end |
Instance Method Details
#visit_name ⇒ Object
67 |
# File 'lib/postscript/model/operators.rb', line 67 def visit_name = "unknown" |