module Crylox
Defined in:
crylox.crcrylox/ast.cr
crylox/token_type.cr
Constant Summary
-
VERSION =
"0.1.0"
Class Method Summary
Macro Summary
-
ast_module(name, &block)
Macro for defining a module to hold AST types, utilizing the visitor architecture.
-
ast_type(ast_class, name, *properties)
Macro for defining an AST type, utilizing the visitor architecture.
Class Method Detail
Macro Detail
macro ast_module(name, &block)
#
Macro for defining a module to hold AST types, utilizing the visitor architecture.
If passed a block with ast_type
calls, it will automatically insert the name as
the first argument.
ast_module Expr do
ast_type Lambda, params : Array(Token), body : Array(Stmt)
# => ast_type Expr, Lambda, params : Array(Token), body : Array(Stmt)
end
macro ast_type(ast_class, name, *properties)
#
Macro for defining an AST type, utilizing the visitor architecture. If called within a block passed to
ast_module
, the first argument is not necessary