remove unsed symbol in parsers
This commit is contained in:
parent
c110670a38
commit
f25456a7a6
@ -43,7 +43,6 @@ let concrete = function
|
|||||||
| "PLUS" -> "+"
|
| "PLUS" -> "+"
|
||||||
| "SLASH" -> "/"
|
| "SLASH" -> "/"
|
||||||
| "TIMES" -> "*"
|
| "TIMES" -> "*"
|
||||||
| "PERCENT" -> "%"
|
|
||||||
|
|
||||||
| "LPAR" -> "("
|
| "LPAR" -> "("
|
||||||
| "RPAR" -> ")"
|
| "RPAR" -> ")"
|
||||||
|
@ -395,7 +395,7 @@ and scan state = parse
|
|||||||
| eof { mk_eof state lexbuf }
|
| eof { mk_eof state lexbuf }
|
||||||
| "[@" (attr as a) "]" { mk_attr "[@" a state lexbuf }
|
| "[@" (attr as a) "]" { mk_attr "[@" a 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
|
(* Management of #include preprocessing directives
|
||||||
|
|
||||||
|
@ -494,8 +494,7 @@ and translate_expression (expr:expression) (env:environment) : michelson result
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
| E_raw_michelson (code, type_anno) ->
|
| E_raw_michelson (code, type_anno) ->
|
||||||
let r = Str.regexp "^{|\\(.*\\)|}$\\|^\"\\(.*\\)\"" in
|
let code = Format.asprintf "{%s}" code in
|
||||||
let code = Str.replace_first r "{\\1}" code in (*remplace the string quotes or varbatim symbol by michelson's code delimiters *)
|
|
||||||
let%bind code = Proto_alpha_utils.Trace.trace_tzresult (raw_michelson_parsing_error code) @@
|
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
|
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
|
let code = Tezos_micheline.Micheline.root code.expanded in
|
||||||
|
Loading…
Reference in New Issue
Block a user