Print Page | Close Window

ending a multi-line comment at end-of-file

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=22388
Printed Date: 25 April 2024 at 10:30pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ending a multi-line comment at end-of-file
Posted By: brian
Subject: ending a multi-line comment at end-of-file
Date Posted: 15 August 2014 at 3:10pm
Hi,

Is it possible to end a multi-line comment block at an end of file? Something like @eof, but there's nothing like this in the documentation that I've seen. Without a matching end tag, our application is not able to collapse the block.

In our syntax, # denotes single-line comments and .DATA OFF and .DATA ON start and end multi line comments.

For example:
.DATA OFF
#this multi-line comment collapses as expected
.DATA ON
.DATA OFF
#this multi-line comment cannot collapse


Lines 1-3 above collapse as expected. But lines 4-5 cannot collapse.

Here is a snippet from our schema file:

lexClass: 
     name          = c_DAT     
     parent:file     = <*.DAT|*.GPS>     
     caseSensitive     = 0
     DisplayName     = 'Normal Text'

lexClass:     
     name          = c_DATCommentSL
     DisplayName     = 'Comment (Single-Line)'
     parent:dyn     = c_DAT
     children     = 0           
     start:tag     ='#'
     end:tag          = @eol
     txt:colorFG     = 0x008800
     txt:Italic     = 1     
     
lexClass:
     name          = c_DATCommentML     
     DisplayName     = 'Comment (Multi-Line)'
     parent:dyn     = c_DAT
     children     = 0          
     start:tag     = '.DATA OFF'
     end:tag          = '.DATA ON'
     // it would be nice if this block can also end with an eof tag
     Collapsable     = 1
     CollapsedText     = '...'
     txt:colorFG     = 0x008800
     txt:Italic     = 1


Thanks in advance for any suggestions,
Brian



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