Functions to set metadata for designtime Farkles. With few exceptions, these functions will have to be applied to the topmost designtime Farkle that will get build, or they will have no effect. Designime Farkles that were applied the functions of this module must not be used with the original designtime Farkles in the same context; only one grammar symbol will be created, with undefined behavior.
Function or value | Description |
Full Usage:
addBlockComment commentStart commentEnd df
Parameters:
string
commentEnd : string
df : 'a
Returns: 'a
|
Adds a block comment to the given `DesigntimeFarkle`.
|
Full Usage:
addLineComment commentStart df
Parameters:
string
df : 'a
Returns: 'a
|
Adds a line comment to the given `DesigntimeFarkle`.
|
Full Usage:
addNoiseSymbol name regex df
Parameters:
string
regex : Regex
df : 'a
Returns: 'a
|
Adds a name-`Regex` pair of noise symbols to the given `DesigntimeFarkle`.
|
Full Usage:
autoWhitespace flag df
Parameters:
bool
df : 'a
Returns: 'a
|
Sets the `AutoWhitespace` field of a `DesigntimeFarkle`'s metadata.
|
Full Usage:
caseSensitive flag df
Parameters:
bool
df : 'a
Returns: 'a
|
Sets the `CaseSensitive` field of a `DesigntimeFarkle`'s metadata.
|
|
Converts an untyped designtime Farkle to a typed one that returns an object. The object the designtime Farkle this function will return is undefined. This function is no longer useful for applying metadata to untyped designtime Farkles.
|
Full Usage:
rename newName df
Parameters:
string
df : 'a
Returns: 'a
|
Changes the name of a designtime Farkle. This function can be applied anywhere, not only to the topmost one, like with other metadata changes.
|
|
Sets a `GrammarMetadata` object to a designtime Farkle. Most other functions in this module are convenience wrappers over this function.
|
|
Sets an `OperatorScope` object to a designtime Farkle. This function can be applied in designtime Farkles that are not the topmost ones. Applying this function many times will discard the existing operator scope.
|