try {
const result = parser.parse(equation);
console.log(result.pretty());
} catch (e) {
console.log("There was an error in the following line");
console.log(e.get_context(equation));
}
But I got several errors indicating that some symbols are not defined (I execute Lark.js through node v16.18.1)
max is not defined
bytes is not defined
expandtabs is not defined
Correct me if I am wrong but I suspect that this code is autogenerated from Python where those symbols are defined. I rewrote it so it can be executed in my environment. I took the following decisions:
I tried to call
get_context()
like this:But I got several errors indicating that some symbols are not defined (I execute Lark.js through node v16.18.1)
Correct me if I am wrong but I suspect that this code is autogenerated from Python where those symbols are defined. I rewrote it so it can be executed in my environment. I took the following decisions: