This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

websql-autocomplete-2
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

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:

How everything works

  1. ANTLR4 grammar and lexer for different {dialect} are defined in src/autocomplete/{dialect}/grammar directories.
  2. Actual parsers and lexers for different {dialect} are generated into src/autocomplete/{dialect}/generated directories.
  3. Dialect specific code, which is required for the core logic to work, is put in src/autocomplete/{dialect}/{dialect}Autocomplete.ts files.
  4. 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 lexers
  • npm run test - Run tests

Readme

Keywords

none

Package Sidebar

Install

npm i websql-autocomplete-2

Weekly Downloads

14

Version

1.0.5

License

Apache-2.0

Unpacked Size

6.13 MB

Total Files

25

Last publish

Collaborators

  • rob.hovsepyan