Skip to content

v4.1.0 - Keywords

Choose a tag to compare

@github-actions github-actions released this 23 Sep 13:36
· 104 commits to main since this release
2ccaf9c

Introducing new token pattern types: Keyword and KeywordChoice!

They do not matches if specific characters are following them:

builder.CreateToken("var_assign")
    .Keyword("var")
    .Identifier()
    .Literal("=")
    .Rule("expression");

// Ok!
var result = parser.Parse("var a = 123");

// Error!
var result = parser.Parse("vara = 123");

See tutorials for more information.