How can I export a function from the jison parser to Angular?

110 Views Asked by At

so far I have been able to import the parser method as follows:

import * as Parser from "src / assets / 1erJison / myGramatica.js" and everything works great doing the following

**Parser.parse (input);**

However, in the semantic actions, I have definitions to build my tree and in the part of jison where I can enter code I have:

% {
  **function getTree () {
  return root;
}**

%}

so far Parser.getTree () doesn't work for me;

Could someone help me to do this, I use angular 10, thanks in advance

0

There are 0 best solutions below