Posted 20 years ago
by SamWare
currently i'm trying to implement the "comment selection block" and "uncomment selection block". i have code to retrieve the single-line comment start pattern from the lexical parser, but it's very strict and the syntax file has to match exactly to my code.
"Single_Line_Comment_State" is, obviously, the state for the single-line comment. original was "CommentState".also, is there a way to "tag" a State or Token as a single-line comment like y'all do with "IsWhitespace" attribute for Patterns? do the lexical parser objects support custom attributes? (i haven't noticed anything for that)
"Single_Line_Comment_State" is, obviously, the state for the single-line comment. original was "CommentState".
string sComment = oToken.Language.LexicalStates["Single_Line_Comment_State"].LexicalScopes[0].StartLexicalPatternGroup[0].Pattern;