Module: Rattler::Parsers::Semantic
- Included in:
- NodeAction, SemanticAction
- Defined in:
- lib/rattler/parsers/semantic.rb
Overview
Semantic
describes parsers that perform a semantic action
Instance Method Summary collapse
-
#bind(scope) ⇒ String
Ruby code that performs the action.
-
#bindable_code ⇒ Object
An object that be bound to a parser scope to return ruby code that performs the action.
-
#semantic? ⇒ Boolean
true
.
Instance Method Details
#bind(scope) ⇒ String
Returns ruby code that performs the action.
10 11 12 |
# File 'lib/rattler/parsers/semantic.rb', line 10 def bind(scope) bindable_code.bind(scope) end |
#bindable_code ⇒ Object
Returns an object that be bound to a parser scope to return ruby code that performs the action.
16 17 18 |
# File 'lib/rattler/parsers/semantic.rb', line 16 def bindable_code @bindable_code ||= create_bindable_code end |
#semantic? ⇒ Boolean
Returns true
.
21 22 23 |
# File 'lib/rattler/parsers/semantic.rb', line 21 def semantic? true end |