It's about Text Block in Java, see https://openjdk.java.net/jeps/355
class Foo {
private String bar = """
hello
world
""";
}
Intuitively I think it should be a token of String kind, covering """\n hello\n world\n """ across lines. But according to current design, it seems not possilbe to define multi-line tokens. I tried in vscode but not working (AFAIK for the moment only vscode implements the feature). I don't know if it's a bug of vscode, or by design.
If it's by design, I have to seperate the text block by defining several tokens for each line. I just feel a little bit unnatural about it. Any clarification to help me understand more?
It's about Text Block in Java, see https://openjdk.java.net/jeps/355
Intuitively I think it should be a token of String kind, covering
"""\n hello\n world\n """across lines. But according to current design, it seems not possilbe to define multi-line tokens. I tried in vscode but not working (AFAIK for the moment only vscode implements the feature). I don't know if it's a bug of vscode, or by design.If it's by design, I have to seperate the text block by defining several tokens for each line. I just feel a little bit unnatural about it. Any clarification to help me understand more?