-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
bytecodeAll issues that relate to the generation of Java BytecodeAll issues that relate to the generation of Java BytecodeenhancementNew feature or requestNew feature or requestparserverifier
Milestone
Description
Some other programming languages (Groovy, JavaScript, Kotlin, ...) allow for string interpolation.
Check if we can/want to allow this as well.
String interpolation: $"xxx{variable}" is an interpolated string and can contain variables. Expressions are not (yet) supported and will be evaluated later. It is possible to escape the { and }. Escaping } is not necessary but permitted: $"This is literally a { and }"
It is not permitted to use an interpolated string as member name (x.$"something" is not allowed) since member names must be constants.
Acceptance criteria:
- Add String Interpolation feature
- Decide: Should this work for ..?
- Single-Quoted Strings
- Double-Quoted Strings
- WYSIWYG-Strings (single or double quoted)
- Add test that checks the feature
- Green path
- Test(s) that test escaping the
{}characters (or whichever chars are used to refer to variables. - reference a non-existing variable
- invoke more complex logic inside the interpolation
- have an interpolation expression that does not return a string (should that attempt an implicit/explicit cast to string or fail?)
Metadata
Metadata
Assignees
Labels
bytecodeAll issues that relate to the generation of Java BytecodeAll issues that relate to the generation of Java BytecodeenhancementNew feature or requestNew feature or requestparserverifier