| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 source_map_builder; | 5 library source_map_builder; |
| 6 | 6 |
| 7 import 'dart:uri'; | |
| 8 | 7 |
| 9 import 'util/util.dart'; | 8 import 'util/util.dart'; |
| 10 import 'scanner/scannerlib.dart' show Token; | 9 import 'scanner/scannerlib.dart' show Token; |
| 11 import 'source_file.dart'; | 10 import 'source_file.dart'; |
| 12 import 'util/uri_extras.dart' show relativize; | 11 import 'util/uri_extras.dart' show relativize; |
| 13 | 12 |
| 14 class SourceMapBuilder { | 13 class SourceMapBuilder { |
| 15 static const int VLQ_BASE_SHIFT = 5; | 14 static const int VLQ_BASE_SHIFT = 5; |
| 16 static const int VLQ_BASE_MASK = (1 << 5) - 1; | 15 static const int VLQ_BASE_MASK = (1 << 5) - 1; |
| 17 static const int VLQ_CONTINUATION_BIT = 1 << 5; | 16 static const int VLQ_CONTINUATION_BIT = 1 << 5; |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 | 191 |
| 193 int getColumn() => sourceFile.getColumn(getLine(), token.charOffset); | 192 int getColumn() => sourceFile.getColumn(getLine(), token.charOffset); |
| 194 | 193 |
| 195 String getSourceName() { | 194 String getSourceName() { |
| 196 if (token.isIdentifier()) return token.slowToString(); | 195 if (token.isIdentifier()) return token.slowToString(); |
| 197 return null; | 196 return null; |
| 198 } | 197 } |
| 199 | 198 |
| 200 bool isValid() => token.charOffset < sourceFile.text.length; | 199 bool isValid() => token.charOffset < sourceFile.text.length; |
| 201 } | 200 } |
| OLD | NEW |