I'm trying to create a Beginning-Of-Line token:
lexer grammar ScriptLexer;
BOL : {getCharPositionInLine() == 0;}; // Beginning Of Line token
But the above emits the error
The name 'getCharPositionInLine' does not exist in the current context
As it creates this code:
private void BOL_action(RuleContext _localctx, int actionIndex) {
switch (actionIndex) {
case 0: getCharPositionInLine() == 0; break;
}
}
Where the getCharPositionInLine()
method doesn't exist...