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

[TableGen] Implement basic parser #47

Merged
merged 1 commit into from
Feb 3, 2025
Merged

[TableGen] Implement basic parser #47

merged 1 commit into from
Feb 3, 2025

Conversation

zero9178
Copy link
Owner

@zero9178 zero9178 commented Feb 3, 2025

This PR is an initial implementation of a parser and PSI for TableGen within IntelliJ. It is already capable of parsing all MLIR TableGen files that I tested it against and build and accurate AST useful for e.g. syntax highlighting.

The reason for implementing this rather than enhancing the LSP is mainly the difficulty of pushing some of these changes upstream, especially as the datastructures are optimized for fast and low-memory compilation, not IDE-like use-cases.

The parser does currently not have good error recovery which is left to future PRs. Tests are not 100% complete either.

This PR is an initial implementation of a parser and PSI for TableGen within IntelliJ. It is already capable of parsing all MLIR TableGen files that I tested it against and build and accurate AST useful for e.g. syntax highlighting.

The reason for implementing this rather than enhancing the LSP is mainly the difficulty of pushing some of these changes upstream, especially as the datastructures are optimized for fast and low-memory compilation, not IDE-like use-cases.

The parser does currently not have good error recovery which is left to future PRs.
Tests are not 100% complete either.
Copy link

github-actions bot commented Feb 3, 2025

Qodana Community for JVM

4 new problems were found

Inspection name Severity Problems
Unused import directive 🔶 Warning 4

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2024.3.4
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@zero9178 zero9178 merged commit 7568456 into main Feb 3, 2025
6 checks passed
@zero9178 zero9178 deleted the expression_parsing branch February 3, 2025 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant