String
struct String
-
Creates a rule, producing the specified token, by compiling the string as STLR source
Declaration
Swift
@available(*, deprecated, message: "Use .dynamicRule(Behaviour.Kind﹚ instead") public func dynamicRule(token: TokenType) -> Rule?
Parameters
token
The token to produce
Return Value
nil
if compilation failed -
Creates a rule of the specified kind (e.g.
.structural(token)
)Declaration
Swift
public func dynamicRule(_ kind: Behaviour.Kind) throws -> Rule
Parameters
kind
The kind of the rule
Return Value
nil
if compilation failed