This repository has been archived on 2024-02-26. You can view files and clone it, but cannot push or open issues or pull requests.
cosmos-sql-language-service/test/ManualTestDescription.txt

18 lines
1.0 KiB
Plaintext

Use of language service package :
- Define antlr grammar for your language. Generate parser and lexer using antlr command. And define the keywords dictionary. Key of item in dictionary is keyword defined in Lexer.g4 and value is the word that used as expected token shown.
- Initialize LanguageService in package with parser, lexer, and keywords dictionary. Parser and lexer are generated by grammar file and keywords dictionary is defined by language service users.
- Use getCompletionWords method of LanguageService to get expected keyword for current input script.
- Use getSyntaxErrors method of LanguageService to get syntax errors for current input script.
Manual Test :
step :
- Define grammar such as "SELECT FROM" in client side.
- Open SQL query editor.
- Type "SELECT" and then type whitespace to get expected token.
expected :
- "FROM" token is in the expected token list that is shown in the IDE.
- With error marker under "SELECT" token. When hovering on the token, error message of "mismatched input '<EOF>' expecting {FROM}" will be shown.