@blockscholes/ql
v0.0.27
Published
BlockScholes query language support for CodeMirror
Downloads
60
Keywords
Readme
CodeMirror 6 language package for BlockScholes query language
This repo defines a CodeMirror language support package for the BlockScholes query language. The query language is used in the UI's historical analyzer. This package tells CodeMirror how to parse the language.
The current implementation only supports function application on strings:
avg("CB.BTC.USD", sum("CB.ETH.EUR"))
TODO
- [ ] support numbers
- [ ] support arithmetic
Making changes
Amend the grammar in src/syntax.grammar. See the Lezer system guide for information on this file format.
Adjust the metadata in
src/index.ts
to work with your new grammar.Adjust the grammar tests in
test/cases.txt
.Build (
yarn run prepare
) and test (yarn test
).Run
yarn run build:grammar
to create values for the parser terms.Publish with
yarn publish --access=public
. You will need to be in the Blockscholes organization on npm.