abstract class Cosmo::AST::Node
- Cosmo::AST::Node
- Reference
- Object
Direct Known Subclasses
Defined in:
cosmo/syntax/parser/ast.crInstance Method Summary
- #end_location : Location | Nil
- #end_location=(end_location : Location | Nil)
-
#single_expression : Node
It yields itself for any node, but if it's a
Statement::ExpressionList
, then it returns the first node of theExpressionList
statement -
#single_expression? : Node | Nil
It yields
nil
always for any regular node. - #start_location : Location | Nil
- #start_location=(start_location : Location | Nil)
- #token : Token
- #visibility : Cosmo::AST::Visibility
- #visibility=(visibility : Cosmo::AST::Visibility)
Instance Method Detail
It yields itself for any node, but if it's a
Statement::ExpressionList
, then it returns the
first node of the ExpressionList
statement
It yields nil
always for any regular node.
(It is overridden by ExpressionList
to implement #single_expression
.)