Hi Thomas,
This sequence of characters, @@, in a comment is messing up with navigation within my code. In the following code, for example, instead of the cursor being placed at the 2 dots to report the syntax error it is placed at the end of the code. In fact any error that occurs after the @@ is never located properly. I came to this conclusion after many days of trying to figure what really is happening. What is the explanation for this behavior? Can it be stopped?
implement main
clauses
run():-/*
This sequence of characters, @@, in a comment is causing harvoc. For all syntax errors
after this comment, the cursor will point at the end of the file. This has caused me many
days of grief. What is the reason for this behaviour?*/
stdio::write(1)..
end implement main
goal
console::runUtf8(main::run).
I have not been able to reproduce the problem. Which version do you use?
What do you mean by "at the end of the code" (do you mean after the last line in the file)?
You should notice that TAB characters can cause confusing problems. The IDE eliminates all TAB characters when saving a file, so once the IDE has saved a file all TAB character related problems will disappear.
I can recreate that behavior caused by "@@" in a multi-line comment, but it is inconsistent. I suspect that it relates to having more than 1 multi-line comment since the erroneous syntax error follows a multi-line comment after other predicates which compile normally. If I insert "@@@" instead of "@@" the code compiles without complaint.
I haven't taken time to fully probe the misbehavior, but it is there in VP 7501.
In my quick test, the cursor ends up at the start of a segment of valid code following a subsequent multi-line comment without "@@" in it. The cursor does not go to the end of the file in ths case.
I then tested this in a tiny class but couldn't reproduce the anomalous behavior.
Peter Muraya wrote:Thomas,
I'm am using build VP 7501
And yes, I mean, the cursor is placed at the end of the last line in the file.
Harrison is right, it is a multi-line comment problem; the single line comment does not have this issue.
Harrison,
In my case, for large or small classes, the cursor is always placed at the end of the last line in the file for any syntax error after the @@. Syntax errors before the @@ are properly located. Can you share the tiny class you tested?