diff options
author | Javier Miranda <miranda@adacore.com> | 2023-03-29 18:48:19 +0000 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-05-29 10:23:18 +0200 |
commit | 833f91bb67700571e03095d4cb0a5055372cff4d (patch) | |
tree | 83685a99e94393030fd47723f7a7497a3de84c3a /gcc/ada/scans.ads | |
parent | f180888c8f38920e6731e5bc1dc5e06f5ac7d340 (diff) | |
download | gcc-833f91bb67700571e03095d4cb0a5055372cff4d.zip gcc-833f91bb67700571e03095d4cb0a5055372cff4d.tar.gz gcc-833f91bb67700571e03095d4cb0a5055372cff4d.tar.bz2 |
ada: Spurious error on string interpolation
The frontend reports spurious errors on operators found in
interpolated string literals.
gcc/ada/
* scans.ads (Inside_Interpolated_String_Expression): New variable.
* par-ch2.adb (P_Interpolated_String_Literal): Set/clear new
variable when parsing interpolated string expressions.
* scng.adb (Set_String): Skip processing operator symbols when we
arescanning an interpolated string literal.
Diffstat (limited to 'gcc/ada/scans.ads')
-rw-r--r-- | gcc/ada/scans.ads | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ada/scans.ads b/gcc/ada/scans.ads index 19e13b6..00381bb 100644 --- a/gcc/ada/scans.ads +++ b/gcc/ada/scans.ads @@ -482,6 +482,9 @@ package Scans is -- or aspect. Used to allow/require nonstandard style rules for =>+ with -- -gnatyt. + Inside_Interpolated_String_Expression : Boolean := False; + -- True while parsing an interpolated string expression + Inside_Interpolated_String_Literal : Boolean := False; -- True while parsing an interpolated string literal |