Add automatic syntax checker, fix editor bugs

This commit is contained in:
Nilay Majorwar
2022-01-22 21:22:38 +05:30
parent dbccab5244
commit 94dce5bfa9
12 changed files with 163 additions and 15 deletions

View File

@ -36,6 +36,10 @@ export default class ChefLanguageEngine implements LanguageEngine<T.ChefRS> {
this._input = DEFAULT_INPUT();
}
validateCode(code: string) {
parseProgram(code);
}
prepare(code: string, input: string) {
this._ast = parseProgram(code);
this._input = new InputStream(input);