Make source map location information more readable.

This changes "file:1:2" to "line 1, column 2 of file" and ":1:2" to
"line 1, column 2" in [SourceFile.getLocationMessage]. The more
machine-readable colon-separated format doesn't make sense for a
message intended for humans.

Since [Location.formatString] seems more likely to be consumed by
machines, its format was left as-is.

This also prepares version 0.9.1 for release.

This was previously submitted as r36603. That caused buildbot errors and was
rolled back by r36615. This CL fixes the test errors in r36603.

R=sigmund@google.com

Review URL: https://codereview.chromium.org//304603003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/csslib@36717 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/lib/src/messages.dart b/lib/src/messages.dart
index 24964ad..6c2ecbf 100644
--- a/lib/src/messages.dart
+++ b/lib/src/messages.dart
@@ -60,6 +60,7 @@
     if (span == null) {
       output.write(message);
     } else {
+      output.write('on ');
       output.write(span.getLocationMessage(message, useColors: colors,
           color: levelColor));
     }
diff --git a/pubspec.yaml b/pubspec.yaml
index 66240e7..09d60e4 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
 name: csslib
-version: 0.10.0
+version: 0.10.0+1
 author: Polymer.dart Team <web-ui-dev@dartlang.org>
 description: A library for parsing CSS.
 homepage: https://www.dartlang.org
@@ -9,7 +9,7 @@
   args: '>=0.9.0 <0.12.0'
   logging: '>=0.9.0 <0.10.0'
   path: '>=0.9.0 <2.0.0'
-  source_maps: '>=0.9.0 <0.10.0'
+  source_maps: '>=0.9.1 <0.10.0'
 dev_dependencies:
   browser: '>=0.9.0 <0.10.0'
   unittest: '>=0.9.0 <0.10.0'
diff --git a/test/error_test.dart b/test/error_test.dart
index 935c618..f48906c 100644
--- a/test/error_test.dart
+++ b/test/error_test.dart
@@ -21,7 +21,7 @@
 
   expect(errors.isEmpty, false);
   expect(errors[0].toString(), r'''
-error :1:24: Unknown property value bolder
+error on line 1, column 24: Unknown property value bolder
 .foobar { font-weight: bolder; }
                        ^^^^^^''');
   expect(stylesheet != null, true);
@@ -38,7 +38,7 @@
 
   expect(errors.isEmpty, false);
   expect(errors[0].toString(), r'''
-error :1:24: Unknown property value lighter
+error on line 1, column 24: Unknown property value lighter
 .foobar { font-weight: lighter; }
                        ^^^^^^^''');
   expect(stylesheet != null, true);
@@ -54,7 +54,7 @@
 
   expect(errors.isEmpty, false);
   expect(errors[0].toString(), r'''
-error :1:24: Unknown property value inherit
+error on line 1, column 24: Unknown property value inherit
 .foobar { font-weight: inherit; }
                        ^^^^^^^''');
   expect(stylesheet != null, true);
@@ -77,7 +77,7 @@
 
   expect(errors.isEmpty, false);
   expect(errors[0].toString(), r'''
-error :1:24: Unexpected value for line-height
+error on line 1, column 24: Unexpected value for line-height
 .foobar { line-height: 120%; }
                        ^^^''');
   expect(stylesheet != null, true);
@@ -93,7 +93,7 @@
 
   expect(errors.isEmpty, false);
   expect(errors[0].toString(), r'''
-error :1:24: Unexpected unit for line-height
+error on line 1, column 24: Unexpected unit for line-height
 .foobar { line-height: 20cm; }
                        ^^''');
   expect(stylesheet != null, true);
@@ -109,7 +109,7 @@
 
   expect(errors.isEmpty, false);
   expect(errors[0].toString(), r'''
-error :1:24: Unknown property value inherit
+error on line 1, column 24: Unknown property value inherit
 .foobar { line-height: inherit; }
                        ^^^^^^^''');
   expect(stylesheet != null, true);
@@ -129,7 +129,7 @@
 
   expect(errors.isEmpty, false);
   expect(errors[0].toString(), r'''
-error :1:1: Not a valid ID selector expected #id
+error on line 1, column 1: Not a valid ID selector expected #id
 # foo { color: #ff00ff; }
 ^''');
   expect(stylesheet != null, true);
@@ -144,7 +144,7 @@
 
   expect(errors.isEmpty, false);
   expect(errors[0].toString(), r'''
-error :1:1: Not a valid class selector expected .className
+error on line 1, column 1: Not a valid class selector expected .className
 . foo { color: #ff00ff; }
 ^''');
   expect(stylesheet != null, true);
@@ -164,7 +164,7 @@
 
   expect(errors.isEmpty, false);
   expect(errors[0].toString(), r'''
-error :1:18: Bad hex number
+error on line 1, column 18: Bad hex number
 .foobar { color: #AH787; }
                  ^^^^^^''');
   expect(stylesheet != null, true);
@@ -179,7 +179,7 @@
 
   expect(errors.isEmpty, false);
   expect(errors[0].toString(), r'''
-error :1:18: Unknown property value redder
+error on line 1, column 18: Unknown property value redder
 .foobar { color: redder; }
                  ^^^^^^''');
 
@@ -195,7 +195,7 @@
 
   expect(errors.isEmpty, false);
   expect(errors[0].toString(), r'''
-error :1:18: Expected hex number
+error on line 1, column 18: Expected hex number
 .foobar { color: # ffffff; }
                  ^''');
 
@@ -211,7 +211,7 @@
 
   expect(errors.isEmpty, false);
   expect(errors[0].toString(), r'''
-error :1:18: Expected hex number
+error on line 1, column 18: Expected hex number
 .foobar { color: # 123fff; }
                  ^''');
 
@@ -238,7 +238,8 @@
 
   expect(errors.isEmpty, false);
   expect(errors[0].toString(),
-      'error :3:20: unicode first range can not be greater than last\n'
+      'error on line 3, column 20: unicode first range can not be greater than '
+        'last\n'
       '  unicode-range: U+400-200;\n'
       '                   ^^^^^^^');
 
@@ -252,7 +253,7 @@
 
   expect(errors.isEmpty, false);
   expect(errors[0].toString(),
-      'error :3:20: unicode range must be less than 10FFFF\n'
+      'error on line 3, column 20: unicode range must be less than 10FFFF\n'
       '  unicode-range: U+12FFFF;\n'
       '                   ^^^^^^');
 }
diff --git a/test/selector_test.dart b/test/selector_test.dart
index f87136e..3f764e7 100644
--- a/test/selector_test.dart
+++ b/test/selector_test.dart
@@ -54,10 +54,11 @@
   // Test for invalid class name (can't start with number).
   var selectorAst = selector('.foobar .1a-story .xyzzy', errors: errors);
   expect(errors.isEmpty, false);
-  expect(errors[0].toString(), r'''
-error :1:9: name must start with a alpha character, but found a number
-.foobar .1a-story .xyzzy
-        ^^''');
+  expect(errors[0].toString(),
+      'error on line 1, column 9: name must start with a alpha character, but '
+        'found a number\n'
+      '.foobar .1a-story .xyzzy\n'
+      '        ^^');
 }
 
 main() {
diff --git a/test/var_test.dart b/test/var_test.dart
index d38569a..0ec2852 100644
--- a/test/var_test.dart
+++ b/test/var_test.dart
@@ -392,25 +392,25 @@
 }''';
 
   var errorStrings = [
-    'error :5:14: Variable is not defined.\n'
+    'error on line 5, column 14: Variable is not defined.\n'
     '  var-a: var(b);\n'
     '             ^^',
-    'error :6:14: Variable is not defined.\n'
+    'error on line 6, column 14: Variable is not defined.\n'
     '  var-b: var(c);\n'
     '             ^^',
-    'error :9:16: Variable is not defined.\n'
+    'error on line 9, column 16: Variable is not defined.\n'
     '  var-one: var(two);\n'
     '               ^^^^',
-    'error :12:17: Variable is not defined.\n'
+    'error on line 12, column 17: Variable is not defined.\n'
     '  var-four: var(five);\n'
     '                ^^^^^',
-    'error :13:17: Variable is not defined.\n'
+    'error on line 13, column 17: Variable is not defined.\n'
     '  var-five: var(six);\n'
     '                ^^^^',
-    'error :16:18: Variable is not defined.\n'
+    'error on line 16, column 18: Variable is not defined.\n'
     '  var-def-1: var(def-2);\n'
     '                 ^^^^^^',
-    'error :17:18: Variable is not defined.\n'
+    'error on line 17, column 18: Variable is not defined.\n'
     '  var-def-2: var(def-3);\n'
     '                 ^^^^^^',
     ];