this.editControl1.ApplyConfiguration(Syncfusion.Windows.Forms.Edit.Enums.KnownLanguages.CSharp); |
At the initialization of config language enable StartComment property by assigning your comment prefix string. |
<ConfigLanguage name="Python" StartComment="#" > |
Lexem with type comment should be added inside the lexems. |
<lexems>
<lexem BeginBlock="(" Type="Operator" />
<lexem BeginBlock=")" Type="Operator" />
<lexem BeginBlock="'" Type="Operator" />
<lexem BeginBlock="car" Type="KeyWord" />
<lexem BeginBlock="cdr" Type="KeyWord" />
<lexem BeginBlock="cons" Type="KeyWord" />
<lexem BeginBlock="#" EndBlock="\n" IsEndRegex="true" Type="Comment" IsComplex="true" OnlyLocalSublexems="true" />
</lexems> |