Skip to content

Commit 4fdb4e0

Browse files
committed
use script origin instead of default pos file
1 parent f15f70d commit 4fdb4e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hscript/Macro.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,13 @@ class Macro {
218218
case ESwitch(e, cases, edef):
219219
ESwitch(convert(e), [for( c in cases ) { values : [for( v in c.values ) convert(v)], expr : convert(c.expr) } ], edef == null ? null : convert(edef));
220220
case EMeta(m, params, esub):
221-
var mpos = #if (!macro && hscriptPos) { file : p.file, min : e.pmin, max : e.pmax } #else p #end;
221+
var mpos = #if (!macro && hscriptPos) { file : e.origin, min : e.pmin, max : e.pmax } #else p #end;
222222
EMeta({ name : m, params : params == null ? [] : [for( p in params ) convert(p)], pos : mpos }, convert(esub));
223223
case ECheckType(e, t):
224224
ECheckType(convert(e), convertType(t));
225225
case ECast(e, t):
226226
ECast(convert(e), t == null ? null : convertType(t));
227-
}, pos : #if (!macro && hscriptPos) { file : p.file, min : e.pmin, max : e.pmax } #else p #end }
227+
}, pos : #if (!macro && hscriptPos) { file : e.origin, min : e.pmin, max : e.pmax } #else p #end }
228228
}
229229

230230
public function typeEncode( t : ComplexType ) : Expr.CType {

0 commit comments

Comments
 (0)