UDL and comments
-
Hello again.
This dialect of BASIC that I am creating a UDL for has three types of comment denoted by:
REM ; 'Everything after one of those until EOL is treated as a comment, i.e.
REM Print a string print "hello"or
print "hello" : rem Print a stringThat’s easy enough. The problem is with the single quote which needs to denote a comment but also has another meaning when enclosing a single character (think of it as similar to evaluating to an ASCII code):
print 'a' ; This will print 55It also works with special character sequences in braces:
print '{white}' ; This will print 5I would like to style those cases differently, however it seems to be beyond the scope of the UDL system to handle this, would that be correct ?
-
You are right, that is one of the limitations.
One way around this limitation would be to use the EnhanceAnyLexer plugin, of which I am the author, and define a regex that matches anything within a beginning'and closing'character.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login