Define a constant for the comments channel number

This commit is contained in:
Sam Harwell 2014-09-28 15:03:14 -05:00
parent 00227078e6
commit dd3eaaa31a
1 changed files with 3 additions and 1 deletions

View File

@ -150,6 +150,8 @@ import org.antlr.v4.tool.*;
@members {
public static final int COMMENTS_CHANNEL = 2;
public CommonTokenStream tokens; // track stream we push to; need for context info
public boolean isLexerRule = false;
@ -265,7 +267,7 @@ COMMENT
// writing a formatter then you will want to preserve the comments off
// channel, but could just skip and save token space if not.
//
$channel=2; // Comments are on channel 2
$channel=COMMENTS_CHANNEL;
}
;