class Ven::Suite::Context::Compiler

Overview

The context for a Compiler.

It may use context to determine whether a symbol was defined and whether it is global or local, as well as to manage compile-time traceback.

Defined in:

ven/suite/context.cr

Instance Method Summary

Instance Method Detail

def bound(symbol : String) #

Declares a bound symbol in the localmost scope.


[View source]
def bound?(symbol : String) #

If symbol is declared and is bound, returns its nest. Otherwise, returns nil.


[View source]
def child(&) #

Evaluates the block inside a child scope.

Yields the depth of the child scope to the block.


[View source]
def scopes : Array(Scope) #

The scope hierarchy. The rightmost scope is the localmost, the leftmost is the globalmost.


[View source]
def trace(tag : QTag, name : String, &) #

Adds a trace for the block. This trace will point to the line set by tag, and will be displayed under the name.


[View source]
def traces : Array(Ven::Suite::Trace) #

An array of traces, which together will form the traceback.


[View source]