File tree 1 file changed +15
-7
lines changed
1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -19,14 +19,14 @@ import 'util/utils.dart';
19
19
20
20
abstract class Lexer extends Recognizer <LexerATNSimulator >
21
21
implements TokenSource {
22
- static final DEFAULT_MODE = 0 ;
23
- static final MORE = - 2 ;
24
- static final SKIP = - 3 ;
22
+ static const int DEFAULT_MODE = 0 ;
23
+ static const int MORE = - 2 ;
24
+ static const int SKIP = - 3 ;
25
25
26
- static final DEFAULT_TOKEN_CHANNEL = Token .DEFAULT_CHANNEL ;
27
- static final HIDDEN = Token .HIDDEN_CHANNEL ;
28
- static final MIN_CHAR_VALUE = 0x0000 ;
29
- static final MAX_CHAR_VALUE = 0x10FFFF ;
26
+ static const int DEFAULT_TOKEN_CHANNEL = Token .DEFAULT_CHANNEL ;
27
+ static const int HIDDEN = Token .HIDDEN_CHANNEL ;
28
+ static const int MIN_CHAR_VALUE = 0x0000 ;
29
+ static const int MAX_CHAR_VALUE = 0x10FFFF ;
30
30
31
31
CharStream _input;
32
32
@@ -173,6 +173,10 @@ abstract class Lexer extends Recognizer<LexerATNSimulator>
173
173
mode_ = m;
174
174
}
175
175
176
+ int getMode () {
177
+ return mode_;
178
+ }
179
+
176
180
void pushMode (int m) {
177
181
if (LexerATNSimulator .debug) {
178
182
log ('pushMode $m ' );
@@ -188,6 +192,10 @@ abstract class Lexer extends Recognizer<LexerATNSimulator>
188
192
return mode_;
189
193
}
190
194
195
+ List <int > get modeStack {
196
+ return _modeStack;
197
+ }
198
+
191
199
/// Set the char stream and reset the lexer
192
200
@override
193
201
set inputStream (CharStream input) {
You can’t perform that action at this time.
0 commit comments