diff --git a/src/passes/01-parser/cameligo/Unlexer.ml b/src/passes/01-parser/cameligo/Unlexer.ml index 523d7efee..1d4ac5fef 100644 --- a/src/passes/01-parser/cameligo/Unlexer.ml +++ b/src/passes/01-parser/cameligo/Unlexer.ml @@ -43,7 +43,6 @@ let concrete = function | "PLUS" -> "+" | "SLASH" -> "/" | "TIMES" -> "*" -| "PERCENT" -> "%" | "LPAR" -> "(" | "RPAR" -> ")" diff --git a/src/passes/01-parser/shared/Lexer.mll b/src/passes/01-parser/shared/Lexer.mll index f5e0ae5f9..136a0fd07 100644 --- a/src/passes/01-parser/shared/Lexer.mll +++ b/src/passes/01-parser/shared/Lexer.mll @@ -395,7 +395,7 @@ and scan state = parse | eof { mk_eof state lexbuf } | "[@" (attr as a) "]" { mk_attr "[@" a state lexbuf } | "[@@" (attr as a) "]" { mk_attr "[@@" a state lexbuf } -| "[%" (insert as i) "]" { mk_insert i state lexbuf } +| "[%" (insert as i) { mk_insert i state lexbuf } (* Management of #include preprocessing directives diff --git a/src/passes/12-compiler/compiler_program.ml b/src/passes/12-compiler/compiler_program.ml index 264ff26e8..94db3329f 100644 --- a/src/passes/12-compiler/compiler_program.ml +++ b/src/passes/12-compiler/compiler_program.ml @@ -494,8 +494,7 @@ and translate_expression (expr:expression) (env:environment) : michelson result ] ) | E_raw_michelson (code, type_anno) -> - let r = Str.regexp "^{|\\(.*\\)|}$\\|^\"\\(.*\\)\"" in - let code = Str.replace_first r "{\\1}" code in (*remplace the string quotes or varbatim symbol by michelson's code delimiters *) + let code = Format.asprintf "{%s}" code in let%bind code = Proto_alpha_utils.Trace.trace_tzresult (raw_michelson_parsing_error code) @@ Tezos_micheline.Micheline_parser.no_parsing_error @@ Michelson_parser.V1.parse_expression ~check:false code in let code = Tezos_micheline.Micheline.root code.expanded in