Hi,
I'm trying to create some editor error syntax highlighting, however I'm running into an issue with what it is and isn't catching.
I simplified it way down, and just have a sample below, I'm hoping this will resolve some of my other small syntax issues I'm seeing (there's some obvious stuff I left out):
var @select = new Terminal(SOQLTokenId.SelectTrigger, "SELECT") { ErrorAlias = "'SELECT'" };
var @semiColon = new Terminal(SOQLTokenId.SemiColon, "SemiColon") { ErrorAlias = "';'" };
var statement = new NonTerminal("Statement");
this.Root = new NonTerminal("CompilationUnit");
statement.CanMatchCallback = CanAlwaysMatch;
Root.Production = statement.ZeroOrMore();
statement.Production = @select + @select; //doesn't work
//statement.Production = @select + @semiColon; //works perfectly
Using the first version of the setting on "statement", I type "select select" and get the squiggly line error and it doesn't work at all (displaying the error "'SELECT'" expected. Using the second version of the setting on "statement", I type "select;" and it works perfectly.
Is it not possible to have two Terminals back-to-back of each other? I realize that anyone will probably just suggest using doing something like @select.ZeroOrMore, however this seems to relate back to some other problems I'm having that I need to understand. Primarily that it doesn't seem to be able to differentiate from an identifier and a standard terminal(like @select).
Thanks,
Ryan