Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Syntax Edit
  New Posts New Posts RSS Feed - LexClass Folding Program
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

LexClass Folding Program

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


Joined: 23 November 2020
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote yixincheng Quote  Post ReplyReply Direct Link To This Post Topic: LexClass Folding Program
    Posted: 23 November 2020 at 11:04am

I refer to the configuration file related to lexClass, such as _cpp.schclass of C++ language, and modify it to generate a new file. The folding part is written like this
lexClass:
name = c_STCodeBlock
parent:dyn = c_ST,c_STCodeBlock
start:tag ='VAR','VAR_INPUT'
// skip:tag ='\\\ r \ n','\\\ n \ r','\\\ n','\\\ r','\\\ t \ n'
end:tag ='END_VAR'
Collapsable = 1 
CollapsedText ='...'

or

lexClass:
name = c_STCodeBlock
parent:dyn = c_ST, c_STCodeBlock
start:tag = 'VAR'
start:tag = 'PROGRAM'
start:tag = 'FUNCTION'
start:tag = 'FUNCTION_BLOCK'
start:tag = 'UNION'
start:tag = 'TYPE'
start:tag = 'STRUCT'
start:tag = 'CASE'
start:tag = 'FOR'
start:tag = 'REPEAT'
start:tag = 'WHILE'
start:tag = 'IF'
start:tag = ':'
start:tag = 'VAR_INPUT'
start:tag = 'VAR_OUTPUT'
start:tag = 'VAR_IN_OUT'
start:tag = 'VAR_GLOBAL'
end:tag = 'END_VAR'
end:tag = 'END_PROGRAM'
end:tag = 'END_FUNCTION'
end:tag = 'END_FUNCTION_BLOCK'
end:tag = 'END_UNION'
end:tag = 'END_TYPE'
end:tag = 'END_STRUCT'
end:tag = 'END_CASE'
end:tag = 'END_FOR'
end:tag = 'END_REPEAT'
end:tag = 'END_WHILE'
end:tag = 'END_IF'
end:tag = 'JMP'
Collapsable = 1 
CollapsedText = '...'
DisplayName = 'Curly Braces'

There are folds, but the keyword color has changed, and nested folds are not supported
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.188 seconds.