Class: JSE::Ast::AstNode
- Inherits:
-
Object
- Object
- JSE::Ast::AstNode
- Defined in:
- lib/jse/ast/base.rb
Direct Known Subclasses
ArrayNode, ExpressionNode, LambdaNode, LiteralNode, ObjectNode, QuoteNode, SymbolNode
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
Instance Method Summary collapse
- #apply(call_env) ⇒ Object
-
#initialize(env) ⇒ AstNode
constructor
A new instance of AstNode.
- #to_json ⇒ Object
Constructor Details
#initialize(env) ⇒ AstNode
Returns a new instance of AstNode.
4 5 6 |
# File 'lib/jse/ast/base.rb', line 4 def initialize(env) @env = env end |
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env.
8 9 10 |
# File 'lib/jse/ast/base.rb', line 8 def env @env end |
Instance Method Details
#apply(call_env) ⇒ Object
10 11 12 |
# File 'lib/jse/ast/base.rb', line 10 def apply(call_env) raise NotImplementedError end |
#to_json ⇒ Object
14 15 16 |
# File 'lib/jse/ast/base.rb', line 14 def to_json raise NotImplementedError end |