Defining rules
The syntakts
block is where you can define any custom or predefined rules.
Declaring a rule
The simplest way to create a rule is with the rule
function
Name
Arguments
Returns
rule
regex: String
render: StyledTextBuilder.(MatchResult, Context: Any)
Syntakts.Builder
rule
regex: Regex
render: StyledTextBuilder.(MatchResult, Context: Any)
Syntakts.Builder
Ex.
More advanced rules
You can use addRule
to add more advanced rules
Name
Arguments
Returns
addRule
rule: Rule
Syntakts.Builder
addRule
regex: String
parse: ParseRule
Syntakts.Builder
addRule
regex: Regex
parse: ParseRule
Syntakts.Builder
Last updated