Skip to content

Commit

Permalink
#328: Improve fix
Browse files Browse the repository at this point in the history
  • Loading branch information
isc-bsaviano committed May 13, 2024
1 parent 825b885 commit 88e421b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/src/providers/diagnostic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,13 @@ export async function onDiagnostics(params: DocumentDiagnosticParams): Promise<D
// Ran off the end of the implementation
(parsed[i][j].l == ld.cls_langindex) ||
// Ran off the end of the method
(/^objectscript(-int)?$/.test(doc.languageId) && j == 0 && parsed[i][j].l == ld.cos_langindex && parsed[i][j].s == ld.cos_label_attrindex) ||
(
// In a routine
/^objectscript(-int)?$/.test(doc.languageId) &&
// This is the first token and it's at the start of the line
j == 0 && parsed[i][j].p == 0 &&
// This token is a label
parsed[i][j].l == ld.cos_langindex && parsed[i][j].s == ld.cos_label_attrindex) ||
// Exited the script
(doc.languageId == "objectscript-csp" && parsed[i][j].l == ld.html_langindex)
) {
Expand Down

0 comments on commit 88e421b

Please sign in to comment.