src/Pure/General/symbol_pos.ML
changeset 67361 f834d6f21c55
parent 62800 7ac100f86863
child 67413 2555713586c8
--- a/src/Pure/General/symbol_pos.ML	Sun Jan 07 14:48:54 2018 +0100
+++ b/src/Pure/General/symbol_pos.ML	Sun Jan 07 15:12:00 2018 +0100
@@ -34,6 +34,7 @@
   val scan_cartouche: string -> T list -> T list * T list
   val scan_cartouche_content: string -> T list -> T list * T list
   val recover_cartouche: T list -> T list * T list
+  val scan_comment_cartouche: string -> T list -> T list * T list
   val scan_comment: string -> T list -> T list * T list
   val scan_comment_body: string -> T list -> T list * T list
   val recover_comment: T list -> T list * T list
@@ -215,6 +216,11 @@
 
 val recover_cartouche = Scan.pass (SOME 0) scan_cartouche_depth;
 
+fun scan_comment_cartouche err_prefix =
+  $$$ Symbol.comment @@@ Scan.many (Symbol.is_blank o symbol) @@@
+  !!! (fn () => err_prefix ^ "cartouche expected after " ^ quote Symbol.comment)
+    (scan_cartouche err_prefix);
+
 
 (* ML-style comments *)