Hi there,
i've recently (which is to say this hasn't always happened) been having a problem with instances of textpad on some machines. Using both the supplied ASP.syn and other downloadable ones like aspjshtml, the SingleComment directive for ASP is not getting highlighted properly.
Worse, since the comment character for ASP is a single quote, this is turning my scripts into looking like random portions of commented and uncommented code: every other comment I make, everything in between the two comments is interpreted as a string. This is even more confusing because nowhere in the ASP syntax definition is a single quote defined as a string delimiter. It's like it's interpreting these things as strings by total magic.
Can anyone tell me what's going on here? Thanks,
Steve
Syntax Highlighting - single-quote commenting
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Syntax Highlighting - single-quote commenting
~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~
-Steve Estes (Tyriel)
AIM: EnderW271
ICQ: 6854118
Email: destes[at]ix.netcom.com
-Steve Estes (Tyriel)
AIM: EnderW271
ICQ: 6854118
Email: destes[at]ix.netcom.com
Figured it out - somehow the HTML class had reacquired *.asp and *.php as members, and was taking precedence.
I now have a new question: if i'm modifying a syntax file, how can I get it to only interpret a particular attribute (say, SingleComment) within a certain set of syntax delimiters (say, <% ... %>), and otherwise treat it as something else (say, a string). Specifically, I want the logic to go like this:
It seems that using SyntaxStart / SyntaxEnd removes all possibility of handling things outside of those syntax tags (like, say, HTML). Are there any alternative directives I can use to make the .syn file tell TP to interpret things differently inside or outside a set of syntax tags?
Thanks,
Steve
I now have a new question: if i'm modifying a syntax file, how can I get it to only interpret a particular attribute (say, SingleComment) within a certain set of syntax delimiters (say, <% ... %>), and otherwise treat it as something else (say, a string). Specifically, I want the logic to go like this:
Code: Select all
If we encounter a single quote ( ' ):
If we are inside a <% ... %> block
then treat as SingleComment
Else
then treat as CharStart / CharEnd
Thanks,
Steve
~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~
-Steve Estes (Tyriel)
AIM: EnderW271
ICQ: 6854118
Email: destes[at]ix.netcom.com
-Steve Estes (Tyriel)
AIM: EnderW271
ICQ: 6854118
Email: destes[at]ix.netcom.com
i post comments in vbscript with two single quotes thus
this is somewhat similar to c-syntax comments:
just that your finger presses a different key twice.
then you can set
in your .syn file
Code: Select all
'' this is a comment
'this is a string'
Code: Select all
//this is a comment
then you can set
Code: Select all
SingleComment = ''