|
@@ -21,7 +21,7 @@
|
|
*/
|
|
*/
|
|
package haxe.macro;
|
|
package haxe.macro;
|
|
|
|
|
|
-import haxe.display.Position;
|
|
|
|
|
|
+import haxe.display.Position.Location;
|
|
import haxe.macro.Expr;
|
|
import haxe.macro.Expr;
|
|
|
|
|
|
class PositionTools {
|
|
class PositionTools {
|
|
@@ -62,12 +62,12 @@ class PositionTools {
|
|
|
|
|
|
#if (macro || display)
|
|
#if (macro || display)
|
|
/**
|
|
/**
|
|
- Converts a `haxe.macro.Position` to a `haxe.display.Range`.
|
|
|
|
|
|
+ Converts a `haxe.macro.Position` to a `haxe.display.Position.Location`.
|
|
|
|
|
|
This operation requires the source file the be known to the Haxe lexer in order
|
|
This operation requires the source file the be known to the Haxe lexer in order
|
|
to determine line breaks. It is thus only available in macro context.
|
|
to determine line breaks. It is thus only available in macro context.
|
|
**/
|
|
**/
|
|
- public static function toRange(p:Position):Range {
|
|
|
|
|
|
+ public static function toLocation(p:Position):Location {
|
|
return Context.load("position_to_range", 1)(p);
|
|
return Context.load("position_to_range", 1)(p);
|
|
}
|
|
}
|
|
#end
|
|
#end
|