Skip to content

Commit

Permalink
Fixes #324
Browse files Browse the repository at this point in the history
  • Loading branch information
isc-bsaviano committed Apr 18, 2024
1 parent b585b25 commit bd0c373
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- Fix issue [#321](https://github.com/intersystems/language-server/issues/321): Show detailed descriptions for syntax errors
- Fix issue [#322](https://github.com/intersystems/language-server/issues/322): Add setting to disable undefined variable warning diagnostics
- Fix issue [#323](https://github.com/intersystems/language-server/issues/323): Go to definition on `##super()` will open the superclass's implementation
- Fix issue [#324](https://github.com/intersystems/language-server/issues/324): Add intellisense for variables set to JSON literal constructors
- Parser changes:
- DP-430347: Track variables in routine procedure blocks
- DP-430473: Fix variable tracking with embedded SQL in routine procedure blocks
Expand Down
11 changes: 11 additions & 0 deletions server/src/utils/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1798,6 +1798,17 @@ function parseSetCommand(doc: TextDocument, parsed: compressedline[], line: numb
}
}
}
else if (parsed[ln][tkn].l == ld.cos_langindex && parsed[ln][tkn].s == ld.cos_jsonb_attrindex) {
// This is a %DynamicObject or %DynamicArray
result.foundset = true;
switch (doc.getText(Range.create(ln,parsed[ln][tkn].p,ln,parsed[ln][tkn].p+parsed[ln][tkn].c))) {
case "{":
result.class = "%Library.DynamicObject";
break;
default:
result.class = "%Library.DynamicArray";
}
}

// Exit the loop because we've already found our variable
brk = true;
Expand Down

0 comments on commit bd0c373

Please sign in to comment.