Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect COBOL variable in EXEC SQL, provides go to def, show refs and hover #375

Draft
wants to merge 40 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
d879fd4
Add a skeleton for SQL preprocessor
lefessan Jun 21, 2024
951de55
SQL is parsed
LilyOlivier Jun 26, 2024
f25b81b
try to copy
LilyOlivier Jun 27, 2024
7fc9933
Add CONNECT and CONNECT RESET
LilyOlivier Jun 28, 2024
e46a5b6
light integration of typeck, size seems correctly calculated
LilyOlivier Jul 10, 2024
cdad875
typoS
LilyOlivier Jul 11, 2024
9a91b6a
refactoring
LilyOlivier Jul 26, 2024
213d2d1
Start transaction
LilyOlivier Jul 29, 2024
29e1955
Merge and conflict resolve
LilyOlivier Jul 29, 2024
500b284
drom
LilyOlivier Jul 29, 2024
61c5c87
add some Cursor utilities
LilyOlivier Aug 2, 2024
ad2bf0a
fix Select Into
LilyOlivier Aug 12, 2024
5c987a9
add Prepare Into and fix typos
LilyOlivier Aug 12, 2024
45be81d
fix Insert
LilyOlivier Aug 13, 2024
ca64c9d
fix select into and simplification
LilyOlivier Aug 14, 2024
a85b842
rework error_treatment, fix cursor, add DeclareTable
LilyOlivier Aug 16, 2024
4f9eb71
fix Cursor and fix some type calculation
LilyOlivier Aug 20, 2024
6b64ff5
somes changes
LilyOlivier Aug 28, 2024
a2be3da
better copy
LilyOlivier Sep 9, 2024
917bd30
note for the one who will continue this work
LilyOlivier Sep 20, 2024
8fa6cf1
Merge branch 'master' into sql_preproc
NeoKaios Oct 3, 2024
4e38236
fix: merge build errors
NeoKaios Oct 4, 2024
ba14fe9
fix: problem with long sql stmt generation
NeoKaios Oct 7, 2024
6e81be0
docs: how to run gixsql test for superbol
NeoKaios Oct 7, 2024
93430b2
fix: multiple bugfixes and refactors
NeoKaios Oct 11, 2024
ff2a927
fix: grammar and add cbsql to cob_extension
NeoKaios Oct 14, 2024
36c117a
feat: update gixsql testsuite doc
NeoKaios Oct 14, 2024
ff34002
fix: failing test
NeoKaios Oct 16, 2024
85cd08c
feat: add sql_ast visitor, fix typo in types
NeoKaios Oct 16, 2024
9c00487
chore: refactor, and using ast visitor
NeoKaios Oct 16, 2024
b0b7364
feat: reactivate sql preproc, go to def/ref active in exec block
NeoKaios Oct 16, 2024
d9adafd
test: autopromote
NeoKaios Oct 16, 2024
1fe8a89
fix: half fix group var need splitting in sql stmt
NeoKaios Oct 22, 2024
b793fd0
Revert "feat: reactivate sql preproc, go to def/ref active in exec bl…
NeoKaios Oct 22, 2024
6def5a8
Revert "test: autopromote"
NeoKaios Oct 22, 2024
4002f79
Merge branch 'master' into sql-preproc
NeoKaios Oct 22, 2024
5e09035
fix: group var splitting in sql preproc
NeoKaios Oct 22, 2024
365cb47
Merge branch 'master' into sql-preproc
NeoKaios Oct 23, 2024
997ef96
feat: reactivate sql_preproc in lsp, added refs and hover to var in exec
NeoKaios Oct 23, 2024
757c676
test: added failing test for completion
NeoKaios Oct 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add a skeleton for SQL preprocessor
lefessan authored and LilyOlivier committed Jun 25, 2024
commit d879fd4b657d364999ef42ce44ec12244ca63826
102 changes: 50 additions & 52 deletions .drom

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -61,7 +61,7 @@ jobs:

- run: opam pin add . -y --no-action

- run: opam depext -y superbol-studio-oss superbol-vscode-platform polka-js-stubs interop-js-stubs node-js-stubs vscode-js-stubs vscode-languageclient-js-stubs vscode-json vscode-debugadapter vscode-debugprotocol superbol-free superbol_free_lib superbol_preprocs superbol_project cobol_common cobol_parser cobol_ptree ebcdic_lib cobol_lsp ppx_cobcflags pretty cobol_config cobol_indent cobol_indent_old cobol_preproc cobol_data cobol_typeck cobol_unit ez_toml ezr_toml sql_ast sql_parser
- run: opam depext -y superbol-studio-oss superbol-vscode-platform polka-js-stubs interop-js-stubs node-js-stubs vscode-js-stubs vscode-languageclient-js-stubs vscode-json vscode-debugadapter vscode-debugprotocol superbol-free superbol_free_lib superbol_preprocs superbol_project cobol_common cobol_parser cobol_ptree ebcdic_lib cobol_lsp ppx_cobcflags pretty cobol_config cobol_indent cobol_indent_old cobol_preproc cobol_data cobol_typeck cobol_unit ez_toml ezr_toml sql_ast sql_parser sql_preproc
# if: steps.cache-opam.outputs.cache-hit != 'true'

- run: opam install -y opam/*.opam --deps-only --with-test
2 changes: 1 addition & 1 deletion Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions drom.toml
Original file line number Diff line number Diff line change
@@ -228,6 +228,10 @@ dir = "src/vendor/ez_toml"
dir = "src/lsp/ezr_toml"
# edit 'src/lsp/ezr_toml/package.toml' for package-specific options

[[package]]
dir = "src/lsp/sql_preproc"
# edit 'src/lsp/ezr_toml/package.toml' for package-specific options

[[package]]
dir = "src/lsp/sql_ast"
# edit 'src/lsp/sql_ast/package.toml' for package-specific options
14 changes: 14 additions & 0 deletions dune-project

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 55 additions & 0 deletions opam/sql_preproc.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This file was generated by `drom` from `drom.toml`.
# Do not modify, or add to the `skip` field of `drom.toml`.
opam-version: "2.0"
name: "sql_preproc"
version: "0.1.3"
license: "MIT"
synopsis: "SuperBOL Studio OSS Project"
description: "SuperBOL Studio OSS is a new platform for COBOL"
authors: [
"Nicolas Berthier <nicolas.berthier@ocamlpro.com>"
"David Declerck <david.declerck@ocamlpro.com>"
"Boris Eng <boris.eng@ocamlpro.com>"
"Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>"
"Emilien Lemaire <emilien.lemaire@ocamlpro.com>"
]
maintainer: [
"Nicolas Berthier <nicolas.berthier@ocamlpro.com>"
"David Declerck <david.declerck@ocamlpro.com>"
"Boris Eng <boris.eng@ocamlpro.com>"
"Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>"
"Emilien Lemaire <emilien.lemaire@ocamlpro.com>"
]
homepage: "https://ocamlpro.github.io/superbol-studio-oss"
doc: "https://ocamlpro.github.io/superbol-studio-oss/sphinx"
bug-reports: "https://github.com/ocamlpro/superbol-studio-oss/issues"
dev-repo: "git+https://github.com/ocamlpro/superbol-studio-oss.git"
tags: "org:ocamlpro"
build: [
["dune" "subst"] {dev}
["sh" "-c" "./scripts/before.sh build '%{name}%'"]
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
["sh" "-c" "./scripts/after.sh build '%{name}%'"]
]
install: [
["sh" "-c" "./scripts/before.sh install '%{name}%'"]
]
depends: [
"ocaml" {>= "4.14.0"}
"dune" {>= "2.8.0"}
"ppx_deriving" {>= "5.2.1"}
"ez_file" {>= "0.3"}
"cobol_indent" {= version}
"odoc" {with-doc}
]
# Content of `opam-trailer` field:
1 change: 1 addition & 0 deletions opam/superbol_free_lib.opam
Original file line number Diff line number Diff line change
@@ -49,6 +49,7 @@ depends: [
"dune" {>= "2.8.0"}
"vscode-json" {= version}
"superbol_preprocs" {= version}
"sql_preproc" {= version}
"lwt" {>= "5"}
"ez_toml" {= version}
"ez_file" {>= "0.3"}
9 changes: 7 additions & 2 deletions src/lsp/cobol_common/version.mlt
Original file line number Diff line number Diff line change
@@ -11,8 +11,13 @@ let query cmd =
else None
with End_of_file -> None

let commit_hash = query "git show -s --pretty=format:%H"
let commit_date = query "git show -s --pretty=format:%ci"
let gitdir =
try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> ""

let commit_hash =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%H")
let commit_date =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci")
let version = "0.1.3"

let string_option = function
9 changes: 7 additions & 2 deletions src/lsp/cobol_config/version.mlt
Original file line number Diff line number Diff line change
@@ -11,8 +11,13 @@ let query cmd =
else None
with End_of_file -> None

let commit_hash = query "git show -s --pretty=format:%H"
let commit_date = query "git show -s --pretty=format:%ci"
let gitdir =
try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> ""

let commit_hash =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%H")
let commit_date =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci")
let version = "0.1.3"

let string_option = function
9 changes: 7 additions & 2 deletions src/lsp/cobol_data/version.mlt
Original file line number Diff line number Diff line change
@@ -11,8 +11,13 @@ let query cmd =
else None
with End_of_file -> None

let commit_hash = query "git show -s --pretty=format:%H"
let commit_date = query "git show -s --pretty=format:%ci"
let gitdir =
try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> ""

let commit_hash =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%H")
let commit_date =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci")
let version = "0.1.3"

let string_option = function
9 changes: 7 additions & 2 deletions src/lsp/cobol_indent/version.mlt
Original file line number Diff line number Diff line change
@@ -11,8 +11,13 @@ let query cmd =
else None
with End_of_file -> None

let commit_hash = query "git show -s --pretty=format:%H"
let commit_date = query "git show -s --pretty=format:%ci"
let gitdir =
try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> ""

let commit_hash =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%H")
let commit_date =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci")
let version = "0.1.3"

let string_option = function
9 changes: 7 additions & 2 deletions src/lsp/cobol_indent_old/version.mlt
Original file line number Diff line number Diff line change
@@ -11,8 +11,13 @@ let query cmd =
else None
with End_of_file -> None

let commit_hash = query "git show -s --pretty=format:%H"
let commit_date = query "git show -s --pretty=format:%ci"
let gitdir =
try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> ""

let commit_hash =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%H")
let commit_date =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci")
let version = "0.1.3"

let string_option = function
9 changes: 7 additions & 2 deletions src/lsp/cobol_lsp/version.mlt
Original file line number Diff line number Diff line change
@@ -11,8 +11,13 @@ let query cmd =
else None
with End_of_file -> None

let commit_hash = query "git show -s --pretty=format:%H"
let commit_date = query "git show -s --pretty=format:%ci"
let gitdir =
try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> ""

let commit_hash =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%H")
let commit_date =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci")
let version = "0.1.3"

let string_option = function
9 changes: 7 additions & 2 deletions src/lsp/cobol_parser/version.mlt
Original file line number Diff line number Diff line change
@@ -11,8 +11,13 @@ let query cmd =
else None
with End_of_file -> None

let commit_hash = query "git show -s --pretty=format:%H"
let commit_date = query "git show -s --pretty=format:%ci"
let gitdir =
try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> ""

let commit_hash =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%H")
let commit_date =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci")
let version = "0.1.3"

let string_option = function
9 changes: 7 additions & 2 deletions src/lsp/cobol_preproc/version.mlt
Original file line number Diff line number Diff line change
@@ -11,8 +11,13 @@ let query cmd =
else None
with End_of_file -> None

let commit_hash = query "git show -s --pretty=format:%H"
let commit_date = query "git show -s --pretty=format:%ci"
let gitdir =
try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> ""

let commit_hash =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%H")
let commit_date =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci")
let version = "0.1.3"

let string_option = function
9 changes: 7 additions & 2 deletions src/lsp/cobol_ptree/version.mlt
Original file line number Diff line number Diff line change
@@ -11,8 +11,13 @@ let query cmd =
else None
with End_of_file -> None

let commit_hash = query "git show -s --pretty=format:%H"
let commit_date = query "git show -s --pretty=format:%ci"
let gitdir =
try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> ""

let commit_hash =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%H")
let commit_date =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci")
let version = "0.1.3"

let string_option = function
9 changes: 7 additions & 2 deletions src/lsp/cobol_typeck/version.mlt
Original file line number Diff line number Diff line change
@@ -11,8 +11,13 @@ let query cmd =
else None
with End_of_file -> None

let commit_hash = query "git show -s --pretty=format:%H"
let commit_date = query "git show -s --pretty=format:%ci"
let gitdir =
try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> ""

let commit_hash =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%H")
let commit_date =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci")
let version = "0.1.3"

let string_option = function
9 changes: 7 additions & 2 deletions src/lsp/cobol_unit/version.mlt
Original file line number Diff line number Diff line change
@@ -11,8 +11,13 @@ let query cmd =
else None
with End_of_file -> None

let commit_hash = query "git show -s --pretty=format:%H"
let commit_date = query "git show -s --pretty=format:%ci"
let gitdir =
try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> ""

let commit_hash =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%H")
let commit_date =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci")
let version = "0.1.3"

let string_option = function
9 changes: 7 additions & 2 deletions src/lsp/ebcdic_lib/ebcdic_version.mlt
Original file line number Diff line number Diff line change
@@ -11,8 +11,13 @@ let query cmd =
else None
with End_of_file -> None

let commit_hash = query "git show -s --pretty=format:%H"
let commit_date = query "git show -s --pretty=format:%ci"
let gitdir =
try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> ""

let commit_hash =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%H")
let commit_date =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci")
let version = "0.1.3"

let string_option = function
9 changes: 7 additions & 2 deletions src/lsp/ezr_toml/version.mlt
Original file line number Diff line number Diff line change
@@ -11,8 +11,13 @@ let query cmd =
else None
with End_of_file -> None

let commit_hash = query "git show -s --pretty=format:%H"
let commit_date = query "git show -s --pretty=format:%ci"
let gitdir =
try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> ""

let commit_hash =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%H")
let commit_date =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci")
let version = "0.1.3"

let string_option = function
9 changes: 7 additions & 2 deletions src/lsp/ppx_cobcflags/version.mlt
Original file line number Diff line number Diff line change
@@ -11,8 +11,13 @@ let query cmd =
else None
with End_of_file -> None

let commit_hash = query "git show -s --pretty=format:%H"
let commit_date = query "git show -s --pretty=format:%ci"
let gitdir =
try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> ""

let commit_hash =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%H")
let commit_date =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci")
let version = "0.1.3"

let string_option = function
9 changes: 7 additions & 2 deletions src/lsp/pretty/version.mlt
Original file line number Diff line number Diff line change
@@ -11,8 +11,13 @@ let query cmd =
else None
with End_of_file -> None

let commit_hash = query "git show -s --pretty=format:%H"
let commit_date = query "git show -s --pretty=format:%ci"
let gitdir =
try Sys.getenv "DUNE_SOURCEROOT" with Not_found -> ""

let commit_hash =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%H")
let commit_date =
query ("git -C \""^gitdir^"\" show -s --pretty=format:%ci")
let version = "0.1.3"

let string_option = function
26 changes: 26 additions & 0 deletions src/lsp/sql_preproc/dune

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading