flix / vscode-flix

Apache License 2.0
20 stars 19 forks source link

Syntax highlighting bug #411

Closed mlutze closed 1 week ago

mlutze commented 1 month ago

image

magnus-madsen commented 1 month ago

This probably in the new parser.

@herluf-ba May be able to help.

Can you post the program in text-- makes it easier to reproduce.

mlutze commented 1 month ago
enum UnsignedInt32(Int32) with Eq

mod UnsignedInt32 {
    pub def fromString(s: String): Option[UnsignedInt32] = {
        import static java.lang.Integer.parseUnsignedInt(String): Int32 \ {};
        Result.tryCatch(() -> parseUnsignedInt(s)) |> Result.toOption |> Option.map(UnsignedInt32)
    }

    pub def toString(u: UnsignedInt32): String = {
        import static java.lang.Integer.toUnsignedString(Int32): String \ {};
        let UnsignedInt32.UnsignedInt32(i) = u;
        toUnsignedString(i)
    }
}
magnus-madsen commented 1 week ago

Fixed.