File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ export class Parser {
141
141
const startToken = this . peek ( ) ;
142
142
const statements : Stmt [ ] = [ ] ;
143
143
while ( ! this . isAtEnd ( ) ) {
144
- if ( this . match ( TokenType . NEWLINE ) ) {
144
+ if ( this . match ( TokenType . NEWLINE ) || this . match ( TokenType . DEDENT ) ) {
145
145
continue ;
146
146
}
147
147
statements . push ( this . stmt ( ) ) ;
Original file line number Diff line number Diff line change @@ -265,12 +265,19 @@ export class Tokenizer {
265
265
while ( this . isDigit ( this . peek ( ) ) ) {
266
266
this . advance ( ) ;
267
267
}
268
+
269
+ if ( this . peek ( ) !== '.' && this . peek ( ) !== 'e' ) {
270
+ this . addToken ( TokenType . BIGINT ) ;
271
+ return ;
272
+ }
273
+
268
274
if ( this . peek ( ) === '.' ) {
269
275
this . advance ( ) ;
270
276
while ( this . isDigit ( this . peek ( ) ) ) {
271
277
this . advance ( ) ;
272
278
}
273
279
}
280
+
274
281
if ( this . peek ( ) === 'e' ) {
275
282
this . advance ( ) ;
276
283
if ( this . peek ( ) === '-' ) {
You can’t perform that action at this time.
0 commit comments