feat(dashboard): hand-rolled Rhai parser + symbol table + Vitest
Foundation for upcoming editor features (scope-aware autocomplete, goto-def / find-usages, source formatter). Hand-rolled recursive descent in TypeScript with Pratt precedence climbing for expressions, error-tolerant so partial trees stay usable while the user is typing. Symbol table walks the AST to produce per-scope declarations, usage sites, and object-literal field maps. Vitest added as a dev-only runner; no editor wiring in this commit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
15
dashboard/vitest.config.ts
Normal file
15
dashboard/vitest.config.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
// Vitest config for unit-testing the Rhai parser / symbol table /
|
||||
// formatter. Kept separate from vite.config.ts because the dev/build
|
||||
// pipeline doesn't depend on a test runner.
|
||||
//
|
||||
// Tests use explicit `import { describe, it, expect } from 'vitest'`
|
||||
// to keep globals out of the type environment.
|
||||
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
include: ['src/lib/rhai/**/*.test.ts'],
|
||||
environment: 'node'
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user