Skip to content

Instantly share code, notes, and snippets.

@amazzalel-habib
Last active May 11, 2020 23:41
Show Gist options
  • Save amazzalel-habib/f9ec885d2afcef38f2cd9ef01b6af60b to your computer and use it in GitHub Desktop.
Save amazzalel-habib/f9ec885d2afcef38f2cd9ef01b6af60b to your computer and use it in GitHub Desktop.
import { TodoExpressionsContext } from "../ANTLR/TodoLangGrammarParser";
import { parseAndGetASTRoot, parseAndGetSyntaxErrors } from "./Parser";
import { ITodoLangError } from "./TodoLangErrorListener";
export default class TodoLangLanguageService {
validate(code: string): ITodoLangError[] {
const syntaxErrors: ITodoLangError[] = parseAndGetSyntaxErrors(code);
//Later we will append semantic errors
return syntaxErrors;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment