-
Notifications
You must be signed in to change notification settings - Fork 0
Rework Diagnostics Folding #140
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f7cdab7
expr: Add Unique Identifier to Expressions
johannes-wolf 75c11e6
diagnostics: Rework Diagnostics
johannes-wolf a52ceee
expr: Make eval Const Again
johannes-wolf c6e04e3
diagnostics: Cursor Fixes
johannes-wolf 33c42ac
diagnostics: Remove Environment & AST Dependencies
johannes-wolf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| // Copyright (c) Navigation Data Standard e.V. - See "LICENSE" file. | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <cstdlib> | ||
|
|
||
| namespace simfil | ||
| { | ||
|
|
||
| class Expr; | ||
| class WildcardExpr; | ||
| class AnyChildExpr; | ||
| class MultiConstExpr; | ||
| class ConstExpr; | ||
| class SubscriptExpr; | ||
| class SubExpr; | ||
| class AnyExpr; | ||
| class EachExpr; | ||
| class CallExpression; | ||
| class UnpackExpr; | ||
| class UnaryWordOpExpr; | ||
| class BinaryWordOpExpr; | ||
| class FieldExpr; | ||
| class PathExpr; | ||
| class AndExpr; | ||
| class OrExpr; | ||
| struct OperatorEq; | ||
| struct OperatorNeq; | ||
| struct OperatorLt; | ||
| struct OperatorLtEq; | ||
| struct OperatorGt; | ||
| struct OperatorGtEq; | ||
| template <class> class UnaryExpr; | ||
| template <class> class BinaryExpr; | ||
|
|
||
| /** | ||
| * Visitor base for visiting expressions recursively. | ||
| */ | ||
| class ExprVisitor | ||
| { | ||
| public: | ||
| ExprVisitor(); | ||
| virtual ~ExprVisitor(); | ||
|
|
||
| virtual void visit(const Expr& expr); | ||
| virtual void visit(const WildcardExpr& expr); | ||
| virtual void visit(const AnyChildExpr& expr); | ||
| virtual void visit(const MultiConstExpr& expr); | ||
| virtual void visit(const ConstExpr& expr); | ||
| virtual void visit(const SubscriptExpr& expr); | ||
| virtual void visit(const SubExpr& expr); | ||
| virtual void visit(const AnyExpr& expr); | ||
| virtual void visit(const EachExpr& expr); | ||
| virtual void visit(const CallExpression& expr); | ||
| virtual void visit(const PathExpr& expr); | ||
| virtual void visit(const FieldExpr& expr); | ||
| virtual void visit(const UnpackExpr& expr); | ||
| virtual void visit(const UnaryWordOpExpr& expr); | ||
| virtual void visit(const BinaryWordOpExpr& expr); | ||
| virtual void visit(const AndExpr& expr); | ||
| virtual void visit(const OrExpr& expr); | ||
| virtual void visit(const BinaryExpr<OperatorEq>& expr); | ||
| virtual void visit(const BinaryExpr<OperatorNeq>& expr); | ||
| virtual void visit(const BinaryExpr<OperatorLt>& expr); | ||
| virtual void visit(const BinaryExpr<OperatorLtEq>& expr); | ||
| virtual void visit(const BinaryExpr<OperatorGt>& expr); | ||
| virtual void visit(const BinaryExpr<OperatorGtEq>& expr); | ||
|
|
||
| protected: | ||
| /* Returns the index of the current expression */ | ||
| std::size_t index() const; | ||
|
|
||
| private: | ||
| std::size_t index_ = 0; | ||
| }; | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.