| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library protocol; | 5 library protocol; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 | 9 |
| 10 import 'package:analysis_server/src/computer/element.dart' show | 10 import 'package:analysis_server/src/computer/element.dart' show |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 if (lineInfo != null) { | 91 if (lineInfo != null) { |
| 92 engine.LineInfo_Location lineLocation = lineInfo.getLocation(offset); | 92 engine.LineInfo_Location lineLocation = lineInfo.getLocation(offset); |
| 93 if (lineLocation != null) { | 93 if (lineLocation != null) { |
| 94 startLine = lineLocation.lineNumber; | 94 startLine = lineLocation.lineNumber; |
| 95 startColumn = lineLocation.columnNumber; | 95 startColumn = lineLocation.columnNumber; |
| 96 } | 96 } |
| 97 } | 97 } |
| 98 location = new Location(file, offset, length, startLine, startColumn); | 98 location = new Location(file, offset, length, startLine, startColumn); |
| 99 } | 99 } |
| 100 // done | 100 // done |
| 101 var severity = new ErrorSeverity(errorCode.errorSeverity.name); | 101 var severity = new AnalysisErrorSeverity(errorCode.errorSeverity.name); |
| 102 var type = new ErrorType(errorCode.type.name); | 102 var type = new AnalysisErrorType(errorCode.type.name); |
| 103 String message = error.message; | 103 String message = error.message; |
| 104 String correction = error.correction; | 104 String correction = error.correction; |
| 105 return new AnalysisError( | 105 return new AnalysisError( |
| 106 severity, | 106 severity, |
| 107 type, | 107 type, |
| 108 location, | 108 location, |
| 109 message, | 109 message, |
| 110 correction: correction); | 110 correction: correction); |
| 111 } | 111 } |
| 112 | 112 |
| (...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); | 944 hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); |
| 945 hash = hash ^ (hash >> 11); | 945 hash = hash ^ (hash >> 11); |
| 946 return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); | 946 return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); |
| 947 } | 947 } |
| 948 | 948 |
| 949 static int hash2(a, b) => finish(combine(combine(0, a), b)); | 949 static int hash2(a, b) => finish(combine(combine(0, a), b)); |
| 950 | 950 |
| 951 static int hash4(a, b, c, d) => | 951 static int hash4(a, b, c, d) => |
| 952 finish(combine(combine(combine(combine(0, a), b), c), d)); | 952 finish(combine(combine(combine(combine(0, a), b), c), d)); |
| 953 } | 953 } |
| OLD | NEW |