Skip to content

class Crystal::MacroInterpreter
inherits Crystal::Visitor

Class methods

.new(program, scope : Type, path_lookup : Type, a_macro : Macro, call, a_def : Def? = nil, in_macro = false)

View source

.new(program : Program, scope : Type, path_lookup : Type, location : Location?, vars = {} of String => ASTNode, block : Block? = nil, def __arg3 : Def? = nil, in_macro = false)

View source

Methods

#accept(node)

View source

#define_var(name : String, value : ASTNode) : Nil

View source

#free_vars : Hash(String, TypeVar)?

View source

#free_vars=(free_vars : Hash(String, TypeVar)?)

View source

#interpret_compare_versions(node)

View source

#interpret_debug(node)

View source

#interpret_env(node)

View source

#interpret_flag?(node)

View source

#interpret_p(node)

View source

#interpret_pp!(node)

View source

#interpret_puts(node)

View source

#interpret_raise(node)

View source

#interpret_read_file(node, nilable = false)

View source

#interpret_run(node)

View source

#interpret_skip_file(node)

View source

#interpret_system(node)

View source

#interpret_top_level_call(node)

View source

#interpret_top_level_call?(node)

View source

#macro_expansion_pragmas : Hash(Int32, Array(Lexer::LocPragma))?

View source

#macro_expansion_pragmas=(macro_expansion_pragmas : Hash(Int32, Array(Lexer::LocPragma))?)

View source

#replace_block_vars(body, vars)

View source

#report_warning_at(*args, **options)

View source

#report_warning_at

View source

#resolve(node : Union)

View source

#resolve(node : Generic)

View source

#resolve(node : Path)

View source

#resolve(node : ASTNode?)

View source

#resolve?(node : ASTNode)

View source

#resolve?(node : Union)

View source

#resolve?(node : Generic)

View source

#resolve?(node : Path)

View source

#to_s : String

Returns a string representation of this object.

Descendants must usually not override this method. Instead, they must override to_s(io), which must append to the given IO object.

View source

#visit(node : MacroIf)

View source

#visit(node : MacroFor)

View source

#visit(node : MacroVar)

View source

#visit(node : OpAssign)

View source

#visit(node : Var)

View source

#visit(node : MacroVerbatim)

View source

#visit(node : MacroLiteral)

View source

#visit(node : MacroExpression)

View source

#visit(node : Expressions)

View source

#visit(node : Assign)

View source

#visit(node : And)

View source

#visit(node : Or)

View source

#visit(node : Not)

View source

#visit(node : If)

View source

#visit(node : Unless)

View source

#visit(node : Call)

View source

#visit(node : Yield)

View source

#visit(node : Path)

View source

#visit(node : Generic)

View source

#visit(node : Splat)

View source

#visit(node : DoubleSplat)

View source

#visit(node : IsA)

View source

#visit(node : InstanceVar)

View source

#visit(node : TupleLiteral)

View source

#visit(node : MultiAssign)

View source

#visit(node : HashLiteral)

View source

#visit(node : ASTNode)

View source

#visit(node : ArrayLiteral)

View source

#visit_macro_for_array_like(node, exp)

View source

#visit_macro_for_array_like

View source

#visit_macro_for_hash_like

View source