|
@@ -1468,12 +1468,12 @@ let rec validate_macro_cond s e = match fst e with
|
|
|
| EConst (String _)
|
|
|
| EConst (Int _)
|
|
|
| EConst (Float _)
|
|
|
- | EConst (Regexp _)
|
|
|
-> e
|
|
|
| EUnop (op,p,e1) -> (EUnop (op, p, validate_macro_cond s e1), snd e)
|
|
|
| EBinop (op,e1,e2) -> (EBinop(op, (validate_macro_cond s e1), (validate_macro_cond s e2)), snd e)
|
|
|
| EParenthesis (e1) -> (EParenthesis (validate_macro_cond s e1), snd e)
|
|
|
| EField(e1,name) -> (EField(validate_macro_cond s e1,name), snd e)
|
|
|
+ | ECall ((EConst (Ident _),_) as i, args) -> (ECall (i,List.map (validate_macro_cond s) args),snd e)
|
|
|
| _ -> syntax_error (Custom ("Invalid conditional expression")) ~pos:(Some (pos e)) s ((EConst (Ident "false"),(pos e)))
|
|
|
|
|
|
let parse_macro_ident t p s =
|