Skip to content

Commit

Permalink
keep the browser console clean
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Azpillaga Aldalur committed Nov 28, 2023
1 parent 5200bca commit a798935
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/main/typescript/ast/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ export class JSONASTParser extends TylasuParser<JSONValue, JSONParser, JsonConte

protected createANTLRLexer(inputStream: CharStream): Lexer
{
return new JSONLexer(inputStream);
let lexer = new JSONLexer(inputStream);
lexer.removeErrorListeners();
return lexer;
}

protected createANTLRParser(tokenStream: TokenStream): JSONParser
{
return new JSONParser(tokenStream);
let parser = new JSONParser(tokenStream);
parser.removeErrorListeners();
return parser;
}

protected parseTreeToAst(parseTreeRoot: JsonContext, considerPosition: boolean, issues: Issue[], source?: Source): JSONValue | undefined
Expand Down
1 change: 0 additions & 1 deletion src/main/typescript/web/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ let decorations = [];
editor.onDidChangeModelContent(() =>
{
let ast = parser.parse(editor.getValue());
console.log(ast);

let diagnostics : any[] = [];
for (let issue of ast.issues)
Expand Down

0 comments on commit a798935

Please sign in to comment.