Skip to content

Decide whether there should be syntax for literal string concatenation #55

@robertmuth

Description

@robertmuth

In C adjacent strings are automatically concatenated.

So printf("hello " "world!") is the same as printf("hello world!")

In Cwerg we do not have this yet.

Example where it would be useful:

let complex_escape_sequence = "\x1b[" "34" ";" "2" "m"

It would be even nicer if this also worked for global constant strings/arrays, e.g.:

let complex_escape_sequence = fmt\SGR_START fmt\SGR_ FG_BLUR ";" fmt\SGR_DIM fmt\SGR_END

this will not parse and we probably need to intruduce an operator, e.g.

let complex_escape_sequence = fmt\SGR_START + fmt\SGR_ FG_BLUR + ";" + fmt\SGR_DIM + fmt\SGR_END

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions