I have a language that uses carriage returns to separate statements (like VB.NET) which I'm using SyntaxEditor to parse and render. I have encountered an issue with "ReportSyntaxError" where you pass it a TextRange that has a length of zero (i.e. StartOffset and EndOffset are the same). Where this is the case, the squiggly red line I would expect to see for an error is not shown. However, the error does appear in the "SyntaxErrors" collection - it isn't displayed.
This issue manifests itself in the following way. If I am on the very last line of the editor and there is a syntax error, it isn't displayed (no red line). As soon as I press ENTER, it is displayed (red line appears). Any errors on lines prior to the last line appear immediately.
I have put in a workaround whereby if the semantic parse data is changed, I check to see if the text of the Document ends with Environment.NewLine, and where this isn't the case, I add one. Very bad, but it works.
Is there any way around this, such as a way to add a new line before the end of the semantic parse data before it gets passed to the semantic parser? This would be more preferable to forcing a new line.
This issue manifests itself in the following way. If I am on the very last line of the editor and there is a syntax error, it isn't displayed (no red line). As soon as I press ENTER, it is displayed (red line appears). Any errors on lines prior to the last line appear immediately.
I have put in a workaround whereby if the semantic parse data is changed, I check to see if the text of the Document ends with Environment.NewLine, and where this isn't the case, I add one. Very bad, but it works.
Is there any way around this, such as a way to add a new line before the end of the semantic parse data before it gets passed to the semantic parser? This would be more preferable to forcing a new line.