code-d
code-d copied to clipboard
Syntax highlighting of range in foreach with function
When a foreach loop with a range, the syntax highlighting also highlights the second dot. (May be related to #410, though likely not)
This does not happen when used as a slice. Not really an issue, just something I noticed. (This also happens with cast(type) 5)
module app;
import std.stdio;
int test(){return 5;}
void main(string[] args) {
int[] a = [1,2,3,4,5,6,7];
foreach (i; 0 .. test()) {
writeln(a[i]);
}
writeln(a[0..test()]);
}
Result:
