From 1c8bbd7ec5b8859f75abfbc4e70482dede2b7007 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Wed, 18 Sep 2013 07:48:57 -0700 Subject: Position#show prints the point. Can't ensure range position points are meaningful when we never see them. To limit noise, only print the point when it != start. [x:y] // point=x, start=x, end=y [p/x:y] // point=p, start=x, end=y I'm open to a different syntax. Also prints NoPosition as [X] rather than [NoPosition] because noise is for construction workers and attenders of rock concerts. Some range position and parser tests are included so we can see the checkfile change when the forthcoming fix happens (either an error message improvement or a positional one.) --- test/files/run/t5603.check | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'test/files/run/t5603.check') diff --git a/test/files/run/t5603.check b/test/files/run/t5603.check index 188f39ff82..255e9356b9 100644 --- a/test/files/run/t5603.check +++ b/test/files/run/t5603.check @@ -1,29 +1,29 @@ [[syntax trees at end of parser]] // newSource1.scala [0:241]package [0:0] { - [0:82]abstract trait Greeting extends [15:82][83]scala.AnyRef { + [6/0:82]abstract trait Greeting extends [15:82][83]scala.AnyRef { [15]def $init$() = [15]{ [15]() }; - [23:39]val name: [33:39]String; - [46:76]val msg = [56:76][56:72][56:71]"How are you, ".$plus([72:76]name) + [27/23:39]val name: [33:39]String; + [50/46:76]val msg = [71/56:76][71/56:72][56:71]"How are you, ".$plus([72:76]name) }; - [87:209]class C extends [94:209][151:159]Greeting { - [119:139]val nameElse = _; + [93/87:209]class C extends [94:209][151:159]Greeting { + [123/119:139]val nameElse = _; [95:101] private[this] val i: [98:101]Int = _; <119:139>def ([95]i: [98]Int) = <119:139>{ <119:139>val nameElse = <134:139>"Bob"; - [NoPosition][NoPosition][NoPosition]super.(); + [X][X][X]super.(); [94]() }; - [168:184]val name = [179:184]"avc"; - [191:203][191:198]println([199:202]msg) + [172/168:184]val name = [179:184]"avc"; + [198/191:203][191:198]println([199:202]msg) }; - [215:241]object Test extends [227:241][235:238]App { + [222/215:241]object Test extends [227:241][235:238]App { [227]def () = [227]{ - [NoPosition][NoPosition][NoPosition]super.(); + [X][X][X]super.(); [227]() }; - [NoPosition] + [X] } } -- cgit v1.2.3