lexer: Fix parsing of { characters in CODE sections.
authorRichard W.M. Jones <rjones@redhat.com>
Fri, 3 Jan 2020 07:44:21 +0000 (07:44 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Fri, 3 Jan 2020 07:44:47 +0000 (07:44 +0000)
src/lexer.mll

index fa73312..4a316a0 100644 (file)
@@ -107,7 +107,8 @@ and read_string buf =
  *)
 and read_code buf level =
     parse
-    | '{'     { incr level; read_code buf level lexbuf }
+    | '{'     { Ast.Substs.add_char buf '{';
+                incr level; read_code buf level lexbuf }
     | '}'     { decr level;
                 if !level = 0 then CODE (Ast.Substs.get buf)
                 else (