UNPKG

@qrvey/formula-lang

Version:

QFormula support for qrvey projects

22 lines 784 B
import { TranspileAST, calculateAST } from '.'; import { QFormulaLang } from './grammar/qformula.grammar'; customElements.whenDefined('q-codemirror-test').then(load); window.formulaSetting = { domain: 'https://manualqastg.qrvey.com', apiKey: 'xtwLW2ZLa4rAcZPef9dD3BOQReBnx5klXPqBKGjm', domainTest: 'http://localhost:3000', userId: 'h4iau2f', appId: '4LA4pR_4T', }; 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