Print Page | Close Window

end:CLASS statement evaluation in lexclass

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Syntax Edit
Forum Description: Topics Related to Codejock Syntax Edit
URL: http://forum.codejock.com/forum_posts.asp?TID=24011
Printed Date: 28 April 2024 at 3:38pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: end:CLASS statement evaluation in lexclass
Posted By: lestat
Subject: end:CLASS statement evaluation in lexclass
Date Posted: 30 June 2020 at 12:43pm
I wrote a lex schema in order to have the xml support but I'm not able to correctly identify  the end of a tag. When the editor find a suitable end tag, it closes all the previously opened tags.
Is it a bug or I made a mistake?
In this output, the block start tags are correctly colored in red, while the end tags are colored in black. The collapse behavior is wrong: the two "<conf>" tags are closed on the first </conf>

Here's a simplified schema:
/// XML ///
lexClass:
parent:file = <*.xml>
name = c_XML
//caseSensitive = 0
txt:colorFG = 0x000000
DisplayName = 'Normal Text'

lexClass:
name = c_XmlBlock_end
parent = c_XML,c_XmlBlock
children = 0
start:tag = '</'
end:tag = '>'
txt:bold = 1
  txt:Underline = 1
DisplayName = 'XML Block (end)'
//:lexClass

lexClass:
name = c_XmlBlock_start
parent = c_XML,c_XmlBlock
start:tag = '<'
end:tag = '>'
txt:bold = 1
  txt:Underline = 1 
txt:colorFG = 0x840000
DisplayName = 'XML Block (start)'
//:lexClass

lexClass:
    name  = c_XmlBlock
  parent:dyn = c_XML, c_XmlBlock
    start:CLASS = c_XmlBlock_start
    end:CLASS = c_XmlBlock_end
    Collapsable = 1
    CollapsedText = '...'
    DisplayName = 'XmlBlock'
//:lexClass



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net