Note: Notice the third case there! keyword actually looks ahead one
character to make sure it is not a letter, number, or underscore. The goal is
to help with parsers like this:
The trouble is that spaces may chomp zero characters (to handle expressions
like [1,2] and [ 1 , 2 ]) and in this case, it would mean letters could
be parsed as let ters and then wonder where the equals sign is! Check out the
token docs if you need to customize this!
Parse keywords like
let,case, andtype.Note: Notice the third case there!
keywordactually looks ahead one character to make sure it is not a letter, number, or underscore. The goal is to help with parsers like this:The trouble is that
spacesmay chomp zero characters (to handle expressions like[1,2]and[ 1 , 2 ]) and in this case, it would meanletterscould be parsed aslet tersand then wonder where the equals sign is! Check out the token docs if you need to customize this!