Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions scripts/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ try {
process.exit(1);
}

const chadc = path.join(projectRoot, '.build', 'chadc');
if (!fs.existsSync(chadc)) {
console.log('Building native compiler (.build/chadc)...');
const chad = path.join(projectRoot, '.build', 'chad');
if (!fs.existsSync(chad)) {
console.log('Building native compiler (.build/chad)...');
try {
execSync('node dist/chadc-node.js src/chadc-native.ts -o .build/chadc', { cwd: projectRoot, stdio: 'inherit' });
execSync('node dist/chad-node.js build src/chad-native.ts -o .build/chad', { cwd: projectRoot, stdio: 'inherit' });
} catch (error) {
console.error('Native compiler build failed');
process.exit(1);
Expand Down Expand Up @@ -54,7 +54,7 @@ child.on('exit', (code) => {
const child2 = spawn('node', ['--import', 'tsx', '--test', 'tests/compiler.test.ts'], {
stdio: 'inherit',
shell: false,
env: { ...process.env, CHADC_COMPILER: 'node dist/chadc-node.js' }
env: { ...process.env, CHAD_COMPILER: 'node dist/chad-node.js build' }
});
child2.on('exit', (code2) => {
process.exit(code2);
Expand Down
4 changes: 3 additions & 1 deletion src/ast/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ export interface FunctionNode {
async?: boolean;
parameters?: FunctionParameter[];
loc?: SourceLocation;
sourceFile?: string;
}

export interface ClassMethod {
Expand All @@ -367,9 +368,10 @@ export interface ClassNode {
name: string;
extends?: string;
implements?: string[];
fields: ClassField[]; // Explicit field declarations
fields: ClassField[];
methods: ClassMethod[];
loc?: SourceLocation;
sourceFile?: string;
}

export interface ImportSpecifier {
Expand Down
Loading
Loading