Skip to content

struct Crystal::MathInterpreter
inherits Struct

Interprets math expressions like 1 + 2 for enum values and constant values that are being used for the N of a StaticArray.

Class methods

.new(path_lookup : Type, visitor : SemanticVisitor? = nil, target_type : IntegerType? = nil)

View source

Methods

#interpret(node : NumberLiteral)

View source

#interpret(node : Call)

View source

#interpret(node : Path)

View source

#interpret(node : Expressions)

View source

#interpret(node : ASTNode)

View source

#interpret_call_macro(node : Call)

View source

#interpret_call_macro?(node : Call)

View source