-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Enhance error detection at parsing time #4210
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
Comments
These three points are covered already in 5.0:
|
After ffa0d4e syntax errors are reported during execution using
|
Need to take a closer look at this and submit concrete issues about errors that could be detected earlier. |
Fixed empty name and keyword validation in 4376e59 |
Also make runtime changes to create a separate Error object in test/keyword bodies and sserialize this in XML and show in logs. Relates to #4210
Also make runtime changes to create a separate Error object in test/keyword bodies and sserialize this in XML and show in logs. Relates to #4210
Also make runtime changes to create a separate Error object in test/keyword bodies and sserialize this in XML and show in logs. Relates to #4210
Also make runtime changes to create a separate Error object in test/keyword bodies and sserialize this in XML and show in logs. Relates to #4210
These errors will now cause failures in running the tests, so the console messages are redundant. Relates to #4210
Also make runtime changes to create a separate Error object in test/keyword bodies and sserialize this in XML and show in logs. Relates to #4210
These errors will now cause failures in running the tests, so the console messages are redundant. Relates to #4210
We decided to leave this part for a later stage: `We also have a similar problem that some of the error situations detected by the parser are not detected as early as they could be. For example, having IF with more than one condition is detected by the parser when the parsing model is validated, but the underlying tokens do not get ERROR type. This is a problem if only using tokens (i.e. when using get_tokens, not get_model) and also when using the model it would be more convenient if invalid tokens could be easily detected. This problem occurs at least in these cases: IF, ELSE IF and WHILE with more than one condition. Other enhancements listed in the original post are now fixed. |
Also make runtime changes to create a separate Error object in test/keyword bodies and sserialize this in XML and show in logs. Relates to #4210
These errors will now cause failures in running the tests, so the console messages are redundant. Relates to #4210
Robot's parser detects many errors already at the parsing time, but there are also many syntax errors that are only detected at the execution time. A problem with detecting errors only at the execution time is that they aren't reported to tools like editor plugins that use Robot's parser. We should thus move error detection to parser as much as possible. This includes at least these cases:
END
,ELSE
,ELSE IF
,EXCEPT
orFINALLY
when there is no matching parent element likeIF
orTRY
.Fixed already in RF 5.0.RETURN
used in test.Fixed already in RF 5.0.BREAK/CONTINUE
outside loops.Fixed already in RF 5.0.RETURN/BREAK/CONTINUE
inFINALLY
.We also have a similar problem that some of the error situations detected by the parser are not detected as early as they could be. For example, having
IF
with more than one condition is detected by the parser when the parsing model is validated, but the underlying tokens do not getERROR
type. This is a problem if only using tokens (i.e. when usingget_tokens
, notget_model
) and also when using the model it would be more convenient if invalid tokens could be easily detected. This problem occurs at least in these cases:IF
,ELSE IF
andWHILE
with more than one condition.ELSE
,END
,BREAK
,CONTINUE
,TRY
andFINALLY
with values.AS
with invalid variable or with more than one variable.Because these latter errors are detected by the parser, only a bit late, I don't consider this limitation as bad as the problem with the earlier errors.
The text was updated successfully, but these errors were encountered: