Преглед изворни кода

[macro] fix PositionTools.toRange (make it toLocation, like it actually behaves)

Dan Korostelev пре 7 година
родитељ
комит
132d7bc646
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      std/haxe/macro/PositionTools.hx

+ 3 - 3
std/haxe/macro/PositionTools.hx

@@ -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