浏览代码

[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;
 
-import haxe.display.Position;
+import haxe.display.Position.Location;
 import haxe.macro.Expr;
 
 class PositionTools {
@@ -62,12 +62,12 @@ class PositionTools {
 
 	#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
 		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);
 	}
 	#end