summaryrefslogtreecommitdiff
path: root/scan.adb
diff options
context:
space:
mode:
Diffstat (limited to 'scan.adb')
-rw-r--r--scan.adb16
1 files changed, 13 insertions, 3 deletions
diff --git a/scan.adb b/scan.adb
index 3490e4e..a8ac7d1 100644
--- a/scan.adb
+++ b/scan.adb
@@ -495,10 +495,20 @@ package body Scan is
("underscore not allowed at the end of a bit string");
end if;
goto Again;
- when others =>
+ when '"' =>
+ pragma Assert (Mark = '%');
Error_Msg_Scan
- ("character '" & C & "' not allowed in a bit string");
- goto Again;
+ ("'""' cannot close a bit string opened by '%'");
+ exit;
+ when '%' =>
+ pragma Assert (Mark = '%');
+ Error_Msg_Scan
+ ("'%' cannot close a bit string opened by '""'");
+ exit;
+ when others =>
+ Error_Msg_Scan ("bit string not terminated");
+ Pos := Pos - 1;
+ exit;
end case;
case Base_Len is