mirror of
https://github.com/robonen/questlang.git
synced 2026-03-21 03:14:44 +00:00
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:
10
src/ast.ts
10
src/ast.ts
@@ -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',
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user