Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support method #81

Draft
wants to merge 27 commits into
base: develop
Choose a base branch
from
Draft
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
8 changes: 5 additions & 3 deletions src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { getDefaultProjectInfo, parseProjectFile, ProjectInfo } from './project-
import { run } from './running/run.js';
import { RunningEnv } from './running/tools.js';
import { analyze } from './semantics/analyze.js';
import { AnalysisEnv } from './semantics/tools.js';
import { SymbolEnv } from './semantics/tools.js';
import { TypeEnv } from './semantics/types.js';
import { parse } from './syntax/parse.js';

export {
Expand Down Expand Up @@ -95,9 +96,10 @@ export class Uguisu {

// static analysis
if (tasks.check) {
const analysisEnv = new AnalysisEnv();
const analysisEnv = new SymbolEnv();
const typeEnv = new TypeEnv();
const symbolTable = new Map();
const result = analyze(sourceFile, analysisEnv, symbolTable, projectInfo);
const result = analyze(sourceFile, analysisEnv, typeEnv, symbolTable, projectInfo);
for (const message of result.errors) {
console.log(`Syntax Error: ${message}`);
}
Expand Down
Loading