+ Extend the parser to recognize the multiline f-strings, which the documentation already implies will work. The syntax is like: ``` x = 'hello' y = 'world' msg = f'''This is a multiline string. Sending a message: '@x@ @y@' ''' ``` which produces: ``` This is a multiline string. Sending a message: 'hello world' ``` + Added some f-string tests cases to "62 string arithmetic" to exercise the new behavior.pull/10103/head
parent
78a6f3bd5c
commit
d771fc7d0b
6 changed files with 101 additions and 9 deletions
@ -0,0 +1,22 @@ |
|||||||
|
## Added support for multiline fstrings |
||||||
|
|
||||||
|
Added support for multiline f-strings which use the same syntax as f-strings |
||||||
|
for string substition. |
||||||
|
|
||||||
|
```meson |
||||||
|
x = 'hello' |
||||||
|
y = 'world' |
||||||
|
|
||||||
|
msg = f'''Sending a message... |
||||||
|
"@x@ @y@" |
||||||
|
''' |
||||||
|
``` |
||||||
|
|
||||||
|
which produces: |
||||||
|
|
||||||
|
``` |
||||||
|
Sending a message.... |
||||||
|
|
||||||
|
"hello world" |
||||||
|
|
||||||
|
``` |
@ -0,0 +1,7 @@ |
|||||||
|
{ |
||||||
|
"stdout": [ |
||||||
|
{ |
||||||
|
"line": "test cases/common/62 string arithmetic/meson.build:25: WARNING: Project targeting '>=0.62.0' but tried to use feature introduced in '0.63.0': multiline format strings." |
||||||
|
} |
||||||
|
] |
||||||
|
} |
Loading…
Reference in new issue