Matthew Dempsky
504a104a2c
cmd/compile/internal/syntax: match old parser errors and line numbers
...
This makes a bunch of changes to package syntax to tweak line numbers
for AST nodes. For example, short variable declaration statements are
now associated with the location of the ":=" token, and function calls
are associated with the location of the final ")" token. These help
satisfy many unit tests that assume the old parser's behavior.
Because many of these changes are questionable, they're guarded behind
a new "gcCompat" const to make them easy to identify and revisit in
the future.
A handful of remaining tests are too difficult to make behave
identically. These have been updated to execute with -newparser=0 and
comments explaining why they need to be fixed.
all.bash now passes with both the old and new parsers.
Change-Id: Iab834b71ca8698d39269f261eb5c92a0d55a3bf4
2016-08-16 14:32:09 -07:00
..
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2013-01-11 22:00:48 +01:00
2016-08-16 14:32:09 -07:00
2016-05-02 13:43:18 +00:00
2015-10-07 14:37:44 +00:00
2016-05-02 13:43:18 +00:00
2016-03-28 16:29:59 +00:00
2016-04-03 17:03:15 +00:00
2014-01-07 13:26:48 +01:00
2013-01-11 22:05:46 +01:00
2016-05-02 13:43:18 +00:00
2016-08-16 14:32:09 -07:00
2016-07-06 20:48:41 +00:00
2013-01-30 20:21:08 +01:00
2012-02-19 13:19:43 +11:00
2016-04-24 21:36:52 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2012-02-19 13:19:43 +11:00
2012-11-08 09:04:27 -08:00
2012-02-19 13:19:43 +11:00
2014-10-06 17:16:39 -04:00
2016-03-17 04:20:02 +00:00
2013-02-12 13:17:49 -05:00
2012-05-24 22:41:07 -04:00
2015-12-02 18:26:38 +00:00
2013-10-08 14:36:20 -04:00
2012-09-10 13:03:07 -07:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2012-02-19 13:19:43 +11:00
2014-12-08 22:18:17 +00:00
2012-02-19 13:19:43 +11:00
2012-02-19 13:19:43 +11:00
2016-04-11 16:01:22 +00:00
2014-10-31 11:08:27 -04:00
2012-02-16 23:48:57 -05:00
2015-01-29 13:07:30 +00:00
2015-02-03 15:48:48 +00:00
2012-07-01 21:59:50 +04:00
2014-01-31 00:30:56 +01:00
2015-06-26 03:38:21 +00:00
2013-03-11 22:55:14 +01:00
2012-03-22 02:14:44 +08:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2012-02-19 13:19:43 +11:00
2016-05-02 13:43:18 +00:00
2013-12-12 17:18:12 -08:00
2012-09-28 08:30:30 -07:00
2012-02-19 13:19:43 +11:00
2015-07-11 14:36:33 +00:00
2015-07-11 14:36:33 +00:00
2016-05-02 13:43:18 +00:00
2015-08-21 20:27:22 +00:00
2016-05-02 13:43:18 +00:00
2012-02-19 13:19:43 +11:00
2012-02-19 13:19:43 +11:00
2012-02-19 13:19:43 +11:00
2015-05-07 23:54:28 +00:00
2012-07-03 09:09:05 +10:00
2013-02-12 13:17:49 -05:00
2012-04-20 23:45:43 +08:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2013-02-12 13:17:49 -05:00
2012-10-07 21:52:57 +02:00
2013-02-12 13:17:49 -05:00
2014-01-24 22:35:11 +04:00
2016-05-02 13:43:18 +00:00
2012-01-18 16:12:24 -08:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2012-02-19 14:28:53 +11:00
2012-02-18 21:18:13 -08:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-06-28 22:09:00 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2013-02-12 13:17:49 -05:00
2014-12-08 22:22:58 +00:00
2015-11-03 18:57:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2013-02-12 13:17:49 -05:00
2013-02-12 13:17:49 -05:00
2012-02-19 14:28:53 +11:00
2013-03-15 15:24:13 -04:00
2012-02-19 14:28:53 +11:00
2012-02-19 14:28:53 +11:00
2012-02-19 14:28:53 +11:00
2012-02-19 14:28:53 +11:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2012-02-19 14:28:53 +11:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2012-02-19 14:28:53 +11:00
2016-05-02 13:43:18 +00:00
2012-02-19 14:28:53 +11:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2012-01-18 16:12:24 -08:00
2016-05-02 13:43:18 +00:00
2015-11-12 18:32:13 +00:00
2012-02-24 13:17:26 +11:00
2012-01-18 16:12:24 -08:00
2012-02-23 18:47:26 +11:00
2013-12-12 19:02:11 -08:00
2016-05-02 13:43:18 +00:00
2012-10-07 23:22:01 +02:00
2012-02-29 15:28:36 -05:00
2012-02-23 18:47:26 +11:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2012-02-23 18:47:26 +11:00
2012-02-23 18:47:26 +11:00
2016-05-02 13:43:18 +00:00
2012-02-23 18:47:26 +11:00
2012-02-20 07:44:24 +11:00
2012-02-23 18:47:26 +11:00
2012-12-17 11:05:58 -05:00
2015-09-05 02:25:01 +00:00
2016-05-02 13:43:18 +00:00
2012-02-23 18:47:26 +11:00
2012-02-23 18:47:26 +11:00
2016-03-28 16:29:59 +00:00
2012-02-23 18:47:26 +11:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2015-12-17 23:36:13 +00:00
2016-05-02 13:43:18 +00:00
2016-05-09 17:31:45 +00:00
2016-04-20 17:37:35 +00:00
2016-05-02 13:43:18 +00:00
2013-02-12 13:17:49 -05:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-08-15 03:37:34 +00:00
2016-05-02 13:43:18 +00:00
2016-08-15 03:37:34 +00:00
2016-04-11 16:01:22 +00:00
2012-02-23 18:47:26 +11:00
2016-05-02 13:43:18 +00:00
2014-08-06 17:02:55 -04:00
2014-10-27 18:59:02 -04:00
2016-03-17 00:38:15 +00:00
2013-08-29 10:00:58 +02:00
2012-02-23 18:47:26 +11:00
2012-10-07 23:22:01 +02:00
2016-05-02 13:43:18 +00:00
2013-02-11 18:20:52 -05:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2013-02-12 13:17:49 -05:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-08-15 03:37:34 +00:00
2016-08-15 03:37:34 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-08-16 14:32:09 -07:00
2016-05-02 13:43:18 +00:00
2012-02-24 10:30:39 +11:00
2012-02-24 10:30:39 +11:00
2016-04-25 20:43:04 +00:00
2014-07-31 13:48:48 -07:00
2014-07-31 13:48:48 -07:00
2012-02-24 13:17:26 +11:00
2012-01-18 16:12:24 -08:00
2016-04-19 22:04:30 +00:00
2014-07-16 19:27:10 -04:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-03-11 21:19:20 +00:00
2016-03-11 21:19:20 +00:00
2016-03-11 21:19:20 +00:00
2016-03-11 22:07:02 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-06-22 00:06:19 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2012-02-24 11:48:19 +11:00
2014-01-29 09:28:23 +01:00
2012-01-18 16:12:24 -08:00
2012-02-24 11:48:19 +11:00
2015-05-21 17:32:17 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-05-02 13:43:18 +00:00
2016-08-15 03:37:34 +00:00
2012-02-24 11:48:19 +11:00
2012-02-24 11:48:19 +11:00
2016-03-30 22:27:13 +00:00
2013-12-12 17:17:02 -08:00
2012-08-08 14:01:23 -07:00
2016-05-02 13:43:18 +00:00
2016-08-16 14:32:09 -07:00
2012-08-03 21:47:26 +02:00
2013-03-15 00:35:09 -04:00
2016-05-31 22:29:36 +00:00
2016-05-31 22:29:36 +00:00
2013-03-15 00:35:09 -04:00
2015-11-03 18:57:18 +00:00
2014-07-01 09:20:51 +02:00
2012-02-24 11:48:19 +11:00
2014-01-03 21:03:20 +01:00
2015-09-06 23:50:51 +00:00
2012-02-24 11:48:19 +11:00
2012-02-24 11:48:19 +11:00
2012-09-28 08:30:30 -07:00
2012-02-24 11:48:19 +11:00
2016-07-06 20:48:41 +00:00
2016-07-06 20:48:41 +00:00
2016-05-02 13:43:18 +00:00
2012-02-24 11:48:19 +11:00
2016-05-02 13:43:18 +00:00
2012-02-24 11:48:19 +11:00
2016-05-02 13:43:18 +00:00
2013-02-12 13:17:49 -05:00