Repository navigation
Conversation
The spec did not compile, as the condition input is a BehaviorSubject and the colored condition tokens were not provided.
Port of the backend condition grammar, so that conditions accepted in the frontend can also be parsed by the backend. Additionally reports input the backend silently mangles: trailing tokens, unary operators used as binary operators and a trailing comma in predicate calls. Long input is shortened in the messages.
Invalid conditions get a red border and the error message in a card below the field. Loaded conditions are checked immediately, changes after a pause of 2 seconds or when leaving the field, in all editors showing the condition. Program statements are not checked. The message does not shift the statement and does not react to clicks. Every statement reserves invisible space below it for the message, as content outside of a node is not reliably repainted by the browser. Bottom handles are moved up by this space to stay at the border of the statement.
…/jml-syntax-parser # Conflicts: # frontend/src/app/components/editor/condition/condition-editor/condition-editor.component.ts
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Added a JML Syntax Parser that detects JML syntax errors and displays a meaningful text underneath the afflicted condition.
Syntax errors can be e.g. an assignment
=instead of==, unbalanced parentheses, missing operands (a >), unknown JML keywords (\result), quantifiers not in the supported form (\forall int i; (…)) or integer literals that are too large for a Javaint.Parser
ConditionParser, so a condition that is valid in the frontend can also be parsed by the backend.a > b cbecomesa > b,A[i].lengthbecomesA[i])a ! b)pred(a,))