Skip to content

Syntax highlighting of range in foreach with function #413

@HuskyNator

Description

@HuskyNator

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:
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions