Class: Loxxy::Ast::LoxBlockStmt
- Inherits:
-
LoxCompoundExpr
- Object
- LoxNode
- LoxCompoundExpr
- Loxxy::Ast::LoxBlockStmt
- Defined in:
- lib/loxxy/ast/lox_block_stmt.rb
Instance Attribute Summary
Attributes inherited from LoxCompoundExpr
Attributes inherited from LoxNode
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(aPosition, decls) ⇒ LoxBlockStmt
constructor
A new instance of LoxBlockStmt.
Methods inherited from LoxCompoundExpr
Methods inherited from LoxNode
Methods included from ASTVisitee
Constructor Details
#initialize(aPosition, decls) ⇒ LoxBlockStmt
Returns a new instance of LoxBlockStmt.
10 11 12 |
# File 'lib/loxxy/ast/lox_block_stmt.rb', line 10 def initialize(aPosition, decls) super(aPosition, [decls]) end |
Instance Method Details
#empty? ⇒ Boolean
14 15 16 |
# File 'lib/loxxy/ast/lox_block_stmt.rb', line 14 def empty? subnodes.size == 1 && subnodes[0].nil? end |