From 723a9d3de473969fee155f1ec06b9e5d3cf38ee7 Mon Sep 17 00:00:00 2001 From: Prev Wong Date: Fri, 27 Oct 2023 14:24:18 +0200 Subject: [PATCH] hotfix: parsing variable kind --- packages/parser/src/lexer.ts | 7 +++++++ packages/parser/src/parser.ts | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/parser/src/lexer.ts b/packages/parser/src/lexer.ts index 7df0e29..870d1d5 100644 --- a/packages/parser/src/lexer.ts +++ b/packages/parser/src/lexer.ts @@ -287,6 +287,13 @@ export class Lexer { } break; } + case TokenType.COMMA: { + if (this.currentContext === tc_kind) { + this.state.popContext(); + } + + break; + } case TokenType.SEMICOLON: { if (this.currentContext === tc_kind) { this.state.popContext(); diff --git a/packages/parser/src/parser.ts b/packages/parser/src/parser.ts index 2b14cdb..3f60731 100644 --- a/packages/parser/src/parser.ts +++ b/packages/parser/src/parser.ts @@ -347,7 +347,8 @@ class _Parser extends Lexer { if ( kindType === 'string' || kindType === 'number' || - kindType === 'boolean' + kindType === 'boolean' || + kindType === 'any' ) { return t.primitiveKind({ primitive: kindType,