class Ven::Parselet::PDefineNud
Overview
Reads and defines a new nud. Properly handles redefinition of subsidiary nuds.
nud greet!(name) {
say("Hi, " ~ $name);
}
greet! "John Doe!"
Defined in:
ven/parselet/nud.crInstance Method Summary
-
#lead! : Tuple(String, Regex | String)
Parses the lead of this nud definition.
- #parse(tag, token)
Instance methods inherited from class Ven::Parselet::PFun
diamond!
diamond!,
given!
given!,
param!(utility = true)
param!,
params!(utility = true)
params!,
parse(tag, token)
parse
Instance methods inherited from class Ven::Parselet::Nud
block(opening = true, semicolon : Bool = false)
block,
die(message : String)
die,
led(precedence : Precedence)led(precedence = @precedence) led, parse(tag : QTag, token : Word) parse, parse!(parser : Ven::Reader, tag : QTag, token : Ven::Word) parse!, semicolon : Bool semicolon, symbol(tag, token = nil) : QSymbol symbol
Constructor methods inherited from class Ven::Parselet::Nud
new(precedence : UInt8 = 0_u8)
new
Instance Method Detail
def lead! : Tuple(String, Regex | String)
#
Parses the lead of this nud definition.
The lead is either a regex pattern (word REGEX) or a keyword (through word SYMBOL).
Returns the type of the word that has to be defined and the trigger.