Question

Syntax error highlighting in Syntax Editor Control

Posted 6 years ago by Avatar Civa
Hi all,

I have downloaded trial version of Syntax Editor control and I am currently testing it.I also created Dynamic language using XML (inherited from DynamicOutliningSyntaxLanguage class) file and all seems to work fine except one thing : I can not manage to see syntax error highlight in syntax editor control (the red curly line which suppose to be placed under some token in code...).Tried almost everything but has no effect.However If I use language created in pure code (so there is no XML file and main class inherits MergableSyntaxLanguage class;parser, lexer,tokens and ast support classes are built manually)everything works fine and i have noticed when there is potential syntax error giving me nearly exact cause and some explanation.

So Is there any possibility to make Dynamic Syntax Language in Syntax Editor have this behavior of syntax error highlighting or not?If YES ,can you please provide me some property or method or hint how can I force code editor control to verify semantic accuracy of code written in it.

Thanks in advance,

Best regards,

Civa

Comments (1)

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Civa,

It is the AST data that is providing syntax errors since the compilation unit has a collection of errors that SyntaxEditor examines. Dynamic languages just mean their lexer uses our pattern-based lexical parser format. They can optionally do semantic parsing and use AST's too, just like a language with a programmatically created lexical parser. So if you wire up a grammar with AST output on a dynamic language, you should see the errors show up.

Actipro Software Support
Information The latest build of this product (2014.1 build 0321) was released 3 months ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.