Skip to content

Commit ca923bc

Browse files
committed
add experiment feat: grammar check, release v1.5.2
1 parent 2e3d21e commit ca923bc

49 files changed

Lines changed: 64726 additions & 97 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
### v1.5.2
2+
- Add experiment feature: Error grammer check.
13
### v1.4.0
24
- Support code format.
35
### v1.3.0

README.md

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,11 @@
11
# Flink-SQL-VsCode
22

3-
This extension provides Flink SQL support for VSCode. It also provides some basic code snippets for operations such as creating a table, altering a table, or renaming columns.
3+
This extension provides Flink SQL support for VSCode. It also provides some basic code snippets for operations such as creating a table, altering a table, or renaming columns and error grammer check.
44

5-
## Build
65

7-
### Prerequisites
6+
## 1.Features
87

9-
- npm
10-
- vsce
11-
12-
### Build
13-
14-
- Run ```npm install --dependencies``` to install dependencies.
15-
- Run ```vsce package``` to build extension.
16-
17-
## Features
18-
19-
Enables syntax highlighting, complete keywords, and code format for Flink SQL(v1.16.0), including user-defined functions.
8+
Enables syntax highlighting, complete keywords, error grammer check, and code format for Flink SQL(v1.16.0), including user-defined functions.
209

2110
![](images/flink-sql-vscode-snippets.gif)
2211

@@ -25,18 +14,23 @@ snippets keywords:
2514
- select
2615
- insert
2716

28-
## How use
17+
## 1.1 How use
2918
Enable the extension on your file, either name the file with a extension:
3019
- SQL
3120
- FQL
3221

3322
Or press F1, type 'Change Language Mode', and then choose FlinkSQL.
3423

35-
### Format
24+
### 1.1.1 Format
3625

3726
Select your FlinkSQL code and press ```Alt+Shift+f```.
3827

39-
## Color theme recommend
28+
### 1.1.2 Error grammer check
29+
> The feature during experiment.
30+
31+
open your `setting.json`, add `"flink-sql-grammar-check.enable": true`
32+
33+
## 1.2 Color theme recommend
4034
~~~json
4135
{
4236
"workbench.colorTheme": "Default Dark+",
@@ -173,6 +167,18 @@ Select your FlinkSQL code and press ```Alt+Shift+f```.
173167
}
174168
~~~
175169

176-
## TODO List
177-
- Support grammer:`Conditional Functions``CASE value WHEN value1_1 [, value1_2]* THEN RESULT1 (WHEN value2_1 [, value2_2 ]* THEN result_2)* (ELSE result_z) END`
178-
- Error grammer highlight
170+
## 2. Dev Grammar
171+
- Edit `FlinkSQL.g4`
172+
- Run `npm run antlr4ts` generate for ts code then move to src directory.
173+
- Copy ./gen ts file to src directory
174+
175+
## 3. Build
176+
177+
### 3.1 Prerequisites
178+
- npm
179+
- vsce
180+
181+
### 3.2 Build
182+
- Run ```npm install --dependencies``` to install dependencies.
183+
- Run ```vsce package``` to build extension.
184+

0 commit comments

Comments
 (0)