abstract class Cosmo::AST::Node

Direct Known Subclasses

Defined in:

cosmo/syntax/parser/ast.cr

Instance Method Summary

Instance Method Detail

def end_location : Location | Nil #

[View source]
def end_location=(end_location : Location | Nil) #

[View source]
def single_expression : Node #

It yields itself for any node, but if it's a Statement::ExpressionList, then it returns the first node of the ExpressionList statement


[View source]
def single_expression? : Node | Nil #

It yields nil always for any regular node. (It is overridden by ExpressionList to implement #single_expression.)


[View source]
def start_location : Location | Nil #

[View source]
def start_location=(start_location : Location | Nil) #

[View source]
abstract def token : Token #

[View source]
def visibility : Cosmo::AST::Visibility #

[View source]
def visibility=(visibility : Cosmo::AST::Visibility) #

[View source]