@qrvey/formula-lang
Version:
QFormula support for qrvey projects
23 lines • 742 B
JavaScript
import { TranspileAST, calculateAST } from '.';
import { QFormulaLang } from './grammar/qformula.grammar';
customElements.whenDefined('q-codemirror-test').then(load);
window.formulaSetting = {
domainTest: 'http://localhost:3000',
// Set information to test. NO Commit!
domain: '',
apiKey: '',
userId: '',
appId: '',
};
function load() {
const quiFormulaEditor = document.querySelector('q-codemirror-integrated-test');
if (quiFormulaEditor) {
quiFormulaEditor.value = '1 + 1';
quiFormulaEditor.langSupport = {
customCalculateAST: calculateAST,
customTranspileAST: TranspileAST,
langDefinition: QFormulaLang,
};
}
}
//# sourceMappingURL=main.js.map