Class: Luoma::Expression
- Inherits:
-
Object
- Object
- Luoma::Expression
- Defined in:
- lib/luoma/expression.rb,
sig/luoma/expression.rbs
Overview
The base class for all expressions.
Direct Known Subclasses
ArrayLiteral, BooleanLiteral, FilteredExpression, FloatLiteral, GroupExpression, IndexSelector, InfixExpression, IntegerLiteral, Lambda, NullLiteral, ObjectLiteral, Predicate, PrefixExpression, RangeLiteral, StringLiteral, TernaryExpression, Variable
Instance Attribute Summary collapse
-
#span ⇒ t_token
readonly
Returns the value of attribute span.
-
#token ⇒ t_token
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#children ⇒ Array[_Traversable]
() -> Array.
-
#evaluate(context) ⇒ Object
(RenderContext) -> untyped.
-
#initialize(token) ⇒ Expression
constructor
(t_token) -> void.
-
#scope ⇒ Array[Name]
() -> Array.
- #to_s ⇒ String
Constructor Details
#initialize(token) ⇒ Expression
(t_token) -> void
11 12 13 14 |
# File 'lib/luoma/expression.rb', line 11 def initialize(token) @token = token @span = token end |
Instance Attribute Details
#span ⇒ t_token (readonly)
Returns the value of attribute span.
8 9 10 |
# File 'lib/luoma/expression.rb', line 8 def span @span end |
#token ⇒ t_token (readonly)
Returns the value of attribute token.
8 9 10 |
# File 'lib/luoma/expression.rb', line 8 def token @token end |
Instance Method Details
#children ⇒ Array[_Traversable]
() -> Array
26 27 28 |
# File 'sig/luoma/expression.rbs', line 26 def children raise "not implemented" end |
#evaluate(context) ⇒ Object
(RenderContext) -> untyped
17 18 19 |
# File 'lib/luoma/expression.rb', line 17 def evaluate(context) raise "not implemented" end |
#scope ⇒ Array[Name]
() -> Array
26 27 28 |
# File 'lib/luoma/expression.rb', line 26 def scope [] end |
#to_s ⇒ String
31 32 33 |
# File 'lib/luoma/expression.rb', line 31 def to_s raise "not implemented" end |