Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Syntax Edit
  New Posts New Posts RSS Feed - end:CLASS statement evaluation in lexclass
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

end:CLASS statement evaluation in lexclass

 Post Reply Post Reply
Author
Message
lestat View Drop Down
Newbie
Newbie


Joined: 30 June 2020
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote lestat Quote  Post ReplyReply Direct Link To This Post Topic: end:CLASS statement evaluation in lexclass
    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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.191 seconds.