Skip to content

docs(essence-parser/lsp): adding documentation for error detection and lsp#1832

Open
Soph1514 wants to merge 35 commits into
mainfrom
docs/error-detection
Open

docs(essence-parser/lsp): adding documentation for error detection and lsp#1832
Soph1514 wants to merge 35 commits into
mainfrom
docs/error-detection

Conversation

@Soph1514

@Soph1514 Soph1514 commented May 22, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds documentation for the error detection implemented in the parser this year. It adds a new directory in the parser documentation folder which contains 3 files (error detection, syntactic, and semantic errors). Some information was already documented in the lsp docs so it was moved to the new directory. The lsp docs were updated to describe only how the lsp uses the error detection of the parser and reference the error detection docs for more information. The diagnostics api doc was also updated in the lsp folder.

This wasn't split into multiple PRs to avoid merge conflicts since the folder structure was also updated.

@conjure-bot

conjure-bot Bot commented May 22, 2026

Copy link
Copy Markdown

Automatically assigned this pull request to @Soph1514.

If it makes more sense for someone else to own it, feel free to reassign it.

@Soph1514
Soph1514 marked this pull request as draft May 22, 2026 17:03
@conjure-bot

conjure-bot Bot commented May 22, 2026

Copy link
Copy Markdown

@leiamcalisteryoung leiamcalisteryoung changed the title docs(essence-parser): adding documentation for syntax error detection docs(essence-parser): adding documentation for error detection May 23, 2026
@leiamcalisteryoung

Copy link
Copy Markdown
Contributor

@Soph1514 why is that one check failing? do you know what it is?

@Soph1514

Copy link
Copy Markdown
Contributor Author

I rerun the test, it is fine now. Not sure what it was

@a-nosnitram a-nosnitram self-assigned this May 24, 2026
@a-nosnitram a-nosnitram linked an issue May 24, 2026 that may be closed by this pull request
@a-nosnitram
a-nosnitram force-pushed the docs/error-detection branch from 1ad5469 to 13a5d6b Compare May 24, 2026 15:54
@Soph1514 Soph1514 changed the title docs(essence-parser): adding documentation for error detection docs(essence-parser/lsp): adding documentation for error detection and lsp May 25, 2026
@Soph1514
Soph1514 requested review from chococara-exe, Copilot and leiamcalisteryoung and removed request for Copilot and leiamcalisteryoung May 25, 2026 10:59
@Soph1514
Soph1514 requested a review from EEJDempster May 25, 2026 10:59

@EEJDempster EEJDempster left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me! thanks for updating the server docs :) lgtm

@Soph1514 Soph1514 moved this to Review in Frontend May 25, 2026

@chococara-exe chococara-exe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@Soph1514
Soph1514 marked this pull request as ready for review May 28, 2026 10:42
@Soph1514
Soph1514 requested a review from HKhan-5 May 28, 2026 10:42

These are detected during parser traversal/conversion while building model structures.

# Detection Flow (parse_model.rs)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if this was a link to parse_model.rs

The [roundtrip/invalid/semantic test directory](https://github.com/conjure-cp/conjure-oxide/tree/main/tests-integration/tests/roundtrip/invalid/semantic) contains various semantic error cases and their expected outputs.

## Note: Keywords as Identifiers
The parser's reserved/keyword list is maintained in `crates/conjure-cp-essence-parser/src/parser/keyword_checks.rs`. When new language keywords are added, update that file so the parser and documentation remain consistent.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice if this was a link too

@@ -1,12 +1,140 @@
[//]: # (Author: Anastasia Martinson)
[//]: # (Last Updated: 18/12/2025)
[//]: # (Author: Liz Dempster, Anastasia Martinson)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is a great overview that should be the first one that is seen. I suggest changing its position to the top of its section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Review

Development

Successfully merging this pull request may close these issues.

update diagnostics api

6 participants