class Ven::Suite::Context::Reader
- Ven::Suite::Context::Reader
- Reference
- Object
Overview
The context for a Reader
The reader uses context to store and look up user-defined nuds, leds and words.
Defined in:
ven/suite/context.crConstructors
Instance Method Summary
- #<<(*args, **options)
- #<<(*args, **options, &)
- #[]=(trigger : String, pattern : Regex)
-
#[]=(trigger : String, nud : Ven::Parselet::PNudMacro)
Defines a reader macro that will be triggered by trigger, a word type.
-
#keyword?(lexeme : String)
Returns whether lexeme is a keyword under this context.
-
#keywords : Array(String)
Keyword lexemes of this context:
-
#nuds : Hash(String, Ven::Parselet::PNudMacro)
A hash that maps word types to their nud macros:
-
#triggers : Hash(String, Regex)
A hash that maps word types to the regex patterns used to match them:
Constructor Detail
Instance Method Detail
def []=(trigger : String, nud : Ven::Parselet::PNudMacro)
#
Defines a reader macro that will be triggered by trigger, a word type. Does not check whether trigger is a valid word type.
def nuds : Hash(String, Ven::Parselet::PNudMacro)
#
A hash that maps word types to their nud macros:
def triggers : Hash(String, Regex)
#
A hash that maps word types to the regex patterns used to match them: