jsymbol
Data structures for symbols and symbol table to be used in compilers/interpreters. Written in TypeScript and can be used in TypeScript and JavaScript projects.
Installation
Using yarn
yarn add jsymbol
Using npm
npm install jsymbol --save
Usage
TypeScript
; ;; // symbol and its type st.addsym; st.enterScope;// assert: st.lookup("counter") === sym; st.exitScope;
JavaScript
const jsymbol = ; let st = sidentifier;let sym = "counter" "variable"; st; st;// assert: st.lookup("counter") === sym; st;