2 points | by 00kevn 6 hours ago ago
1 comments
The syntax highlighter not understanding GStrings (heh) doesn't help here.
It's obvious once you release that whatever is inside a GString is simply an expression.
def expr = foo."${baz}" println("Bar value: ${expr}")
But this, or any of the other variations...
def expr = foo." + baz + " println("Bar value: ${expr}")
If the syntax highlighter understood GStrings, then this would be obvious.
Let S be string colour and _ be non-string colour:
println("Bar value: ${foo."${baz}"}") ________SSSSSSSSSSSSSS____SSS___SSSS_
The syntax highlighter not understanding GStrings (heh) doesn't help here.
It's obvious once you release that whatever is inside a GString is simply an expression.
This makes sense.But this, or any of the other variations...
...does not make sense.If the syntax highlighter understood GStrings, then this would be obvious.
Let S be string colour and _ be non-string colour: