1.0.5 • Published 1 year ago
websql-autocomplete-2 v1.0.5
WebSQL autocomplete 2
A tool that provides autocompletion for various sql dialects.
Autocomplete theory
In order to parse any language, you need a lexer (tokenizer) and a parser (ast builder)
Resources to research:
- The ANTLR Mega Tutorial: https://tomassetti.me/antlr-mega-tutorial/
- Code Completion with ANTLR4-c3: https://tomassetti.me/code-completion-with-antlr4-c3/
How everything works
- ANTLR4 grammar and lexer for different
{dialect}
are defined insrc/autocomplete/{dialect}/grammar
directories. - Actual parsers and lexers for different
{dialect}
are generated intosrc/autocomplete/{dialect}/generated
directories. - Dialect specific code, which is required for the core logic to work, is put in
src/autocomplete/{dialect}/{dialect}Autocomplete.ts
files. - The core logic is inside
src/index.ts
file. It uses dialect specific helpers to generate autocomplete suggestions based on current cursor position.
Main scripts
npm run generate
- Generate parsers and lexersnpm run test
- Run tests
1.0.5
1 year ago
1.0.4
1 year ago
1.0.3
1 year ago
1.0.2
1 year ago
0.5.3
1 year ago
0.5.0
1 year ago
0.4.0
1 year ago
0.5.2
1 year ago
0.5.1
1 year ago
0.3.19
1 year ago
0.3.18
1 year ago
0.3.17
1 year ago
0.3.16
1 year ago
0.3.15
1 year ago
0.3.9
1 year ago
0.3.14
1 year ago
0.3.7
1 year ago
0.3.13
1 year ago
0.3.12
1 year ago
0.3.11
1 year ago
0.3.10
1 year ago
0.3.6
1 year ago
0.3.5
1 year ago
0.3.4
1 year ago