fix: lint, type errors

test: specify types for path checks in interpreter tests

test: add optional chaining in lexer tests to prevent errors

test: add optional chaining in parser tests to prevent errors

fix: clean up whitespace and formatting in AST and lexer files

feat: enhance CLI with improved error handling and user prompts

fix: update index and interpreter files for better type handling

fix: clean up parser code for better readability and error handling

build: enable minification in tsdown configuration
This commit is contained in:
2025-09-01 02:44:45 +07:00
parent eb357ef703
commit 13d79e37bb
14 changed files with 279 additions and 248 deletions

View File

@@ -6,7 +6,7 @@ export enum TokenType {
IDENTIFIER = 'IDENTIFIER',
STRING = 'STRING',
NUMBER = 'NUMBER',
// Keywords
QUEST = 'квест',
GOAL = 'цель',
@@ -19,12 +19,12 @@ export enum TokenType {
TRANSITIONS = 'переходы',
OPTIONS = 'варианты',
TITLE = 'название',
// Node types
INITIAL = 'начальный',
ACTION = 'действие',
ENDING = 'концовка',
// Symbols
SEMICOLON = ';',
COLON = ':',
@@ -36,12 +36,12 @@ export enum TokenType {
RIGHT_BRACKET = ']',
LEFT_PAREN = '(',
RIGHT_PAREN = ')',
// Special
EOF = 'EOF',
NEWLINE = 'NEWLINE',
COMMENT = 'COMMENT',
WHITESPACE = 'WHITESPACE'
WHITESPACE = 'WHITESPACE',
}
/**