class CLTK::Parser::Environment
- CLTK::Parser::Environment
- Reference
- Object
Overview
############################### All actions passed to Parser.producation and Parser.clause are evaluated inside an instance of the Environment class or its subclass (which must have the same name).
Defined in:
cltk/parser/environment.crConstructors
-
.new
Instantiate a new Environment object.
Instance Method Summary
-
#error(o)
Adds an object to the list of errors.
-
#errors : Array(CLTK::Type)
A list of all objects added using the error method.
-
#he : Bool?
Indicates if an error was encountered and handled.
-
#he=(he : Bool | Nil)
Indicates if an error was encountered and handled.
-
#pos(n)
Returns a StreamPosition object for the symbol at location n, indexed from zero.
-
#reset
Reset any variables that need to be re-initialized between parse calls.
-
#set_positions(positions : Array(CLTK::StreamPosition))
Setter for the positions array.
- #yield_with_self(&)
Instance methods inherited from class Object
in?(collection : Array | Set)
in?
Constructor Detail
Instance Method Detail
def errors : Array(CLTK::Type)
#
A list of all objects added using the error method.
@return [Array