Pārlūkot izejas kodu

added mk_pos needed for "macro" in macro context

Nicolas Cannasse 13 gadi atpakaļ
vecāks
revīzija
6640fcd73a
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 3 0
      interp.ml

+ 3 - 0
interp.ml

@@ -2361,6 +2361,9 @@ let rec eval ctx (e,p) =
 			| VObject o -> get_field o h
 			| _ -> throw ctx p ("Invalid field access : " ^ f)
 		)
+	| ECall ((EConst (Builtin "mk_pos"),_),[(ECall (_,[EConst (String file),_]),_);(EConst (Int min),_);(EConst (Int max),_)]) ->
+		let pos = VAbstract (APos { Ast.pfile = file; Ast.pmin = min; Ast.pmax = max }) in
+		(fun() -> pos)
 	| ECall ((EConst (Builtin "typewrap"),_),[t]) ->
 		(fun() -> VAbstract (ATDecl (Obj.magic t)))
 	| ECall ((EConst (Builtin "delay_call"),_),[EConst (Int index),_]) ->