Superpower: match a string with tokenizer only if it begins a line
问题 When tokenizing in superpower, how to match a string only if it is the first thing in a line (note: this is a different question than this one) ? For example, assume I have a language with only the following 4 characters (' ', ':', 'X', 'Y'), each of which is a token. There is also a 'Header' token to capture cases of the following regex pattern /^[XY]+:/ (any number of Xs and Ys followed by a colon, only if they start the line). Here is a quick class for testing (the 4th test-case fails):