I have the following code and I want to define a syntax highlight rule that will show all lines as commented out starting at the line with ##
till the indentation ends just before the last print line.
The indentation works like that in python.
function test a b
arg Int a b
## if a>b
show "Bigger"
another command
print "More stuff"
I think I should use something like the following, but how do I define the end condition based on indentation ? The start condition should somehow remember its indentation and the end condition should use that information. But how ?
syntax region myComment start=/\v##/ skip=/\v\\./ end=???
The comment highligthing should also stop when encountering a blank line.
function test a b
arg Int a b
## if a>b
show "Bigger"
function more a b
arg Int a b