|
@@ -99,7 +99,7 @@ let make_macro_com_api com mcom p =
|
|
|
let parse_metadata s p =
|
|
|
try
|
|
|
match ParserEntry.parse_string (ParserConfig.default_config com.defines) Grammar.parse_meta s null_pos raise_typing_error false with
|
|
|
- | ParseSuccess(meta,_,_) -> meta
|
|
|
+ | ParseSuccess(meta,_) -> meta
|
|
|
| ParseError(_,_,_) -> raise_typing_error "Malformed metadata string" p
|
|
|
with _ ->
|
|
|
raise_typing_error "Malformed metadata string" p
|
|
@@ -169,8 +169,8 @@ let make_macro_com_api com mcom p =
|
|
|
|
|
|
try
|
|
|
let r = match ParserEntry.parse_expr_string (ParserConfig.file_parser_config com p.pfile) s p raise_typing_error inl with
|
|
|
- | ParseSuccess(data,true,_) when inl -> data (* ignore errors when inline-parsing in display file *)
|
|
|
- | ParseSuccess(data,_,_) -> data
|
|
|
+ | ParseSuccess(data,{pd_was_display_file = true}) when inl -> data (* ignore errors when inline-parsing in display file *)
|
|
|
+ | ParseSuccess(data,_) -> data
|
|
|
| ParseError _ -> Interp.exc_string "Invalid expression"
|
|
|
in
|
|
|
exit();
|
|
@@ -187,7 +187,7 @@ let make_macro_com_api com mcom p =
|
|
|
);
|
|
|
parse = (fun entry s ->
|
|
|
match ParserEntry.parse_string (ParserConfig.default_config com.defines) entry s null_pos raise_typing_error false with
|
|
|
- | ParseSuccess(r,_,_) -> r
|
|
|
+ | ParseSuccess(r,_) -> r
|
|
|
| ParseError(_,(msg,p),_) -> Parser.error msg p
|
|
|
);
|
|
|
register_file_contents = (fun file content ->
|
|
@@ -302,7 +302,7 @@ let make_macro_api ctx mctx p =
|
|
|
let parse_metadata s p =
|
|
|
try
|
|
|
match ParserEntry.parse_string (ParserConfig.default_config mctx.com.defines) Grammar.parse_meta s null_pos raise_typing_error false with
|
|
|
- | ParseSuccess(meta,_,_) -> meta
|
|
|
+ | ParseSuccess(meta,_) -> meta
|
|
|
| ParseError(_,_,_) -> raise_typing_error "Malformed metadata string" p
|
|
|
with _ ->
|
|
|
raise_typing_error "Malformed metadata string" p
|
|
@@ -1028,7 +1028,7 @@ let resolve_init_macro com e =
|
|
|
let e = try
|
|
|
if String.get e (String.length e - 1) = ';' then raise_typing_error "Unexpected ;" p;
|
|
|
begin match ParserEntry.parse_expr_string (ParserConfig.default_config com.defines) e p raise_typing_error false with
|
|
|
- | ParseSuccess(data,_,_) -> data
|
|
|
+ | ParseSuccess(data,_) -> data
|
|
|
| ParseError(_,(msg,p),_) -> (Parser.error msg p)
|
|
|
end
|
|
|
with err ->
|