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 {
141141 const startToken = this . peek ( ) ;
142142 const statements : Stmt [ ] = [ ] ;
143143 while ( ! this . isAtEnd ( ) ) {
144- if ( this . match ( TokenType . NEWLINE ) ) {
144+ if ( this . match ( TokenType . NEWLINE ) || this . match ( TokenType . DEDENT ) ) {
145145 continue ;
146146 }
147147 statements . push ( this . stmt ( ) ) ;
Original file line number Diff line number Diff line change @@ -265,12 +265,19 @@ export class Tokenizer {
265265 while ( this . isDigit ( this . peek ( ) ) ) {
266266 this . advance ( ) ;
267267 }
268+
269+ if ( this . peek ( ) !== '.' && this . peek ( ) !== 'e' ) {
270+ this . addToken ( TokenType . BIGINT ) ;
271+ return ;
272+ }
273+
268274 if ( this . peek ( ) === '.' ) {
269275 this . advance ( ) ;
270276 while ( this . isDigit ( this . peek ( ) ) ) {
271277 this . advance ( ) ;
272278 }
273279 }
280+
274281 if ( this . peek ( ) === 'e' ) {
275282 this . advance ( ) ;
276283 if ( this . peek ( ) === '-' ) {
You can’t perform that action at this time.
0 commit comments