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 dart2js.compiler_base; | 5 library dart2js.compiler_base; |
6 | 6 |
7 import 'dart:async' show | 7 import 'dart:async' show |
8 EventSink, | 8 EventSink, |
9 Future; | 9 Future; |
10 | 10 |
(...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1852 return validateToken(from, to); | 1852 return validateToken(from, to); |
1853 } | 1853 } |
1854 } | 1854 } |
1855 return true; | 1855 return true; |
1856 }, message: "Invalid current element: $currentElement [$begin,$end].")); | 1856 }, message: "Invalid current element: $currentElement [$begin,$end].")); |
1857 } | 1857 } |
1858 return new SourceSpan.fromTokens(uri, begin, end); | 1858 return new SourceSpan.fromTokens(uri, begin, end); |
1859 } | 1859 } |
1860 | 1860 |
1861 SourceSpan spanFromNode(Node node) { | 1861 SourceSpan spanFromNode(Node node) { |
1862 return spanFromTokens(node.getBeginToken(), node.getEndToken()); | 1862 return spanFromTokens(node.getBeginToken(), node.getPrefixEndToken()); |
1863 } | 1863 } |
1864 | 1864 |
1865 SourceSpan spanFromElement(Element element) { | 1865 SourceSpan spanFromElement(Element element) { |
1866 if (element != null && element.sourcePosition != null) { | 1866 if (element != null && element.sourcePosition != null) { |
1867 return element.sourcePosition; | 1867 return element.sourcePosition; |
1868 } | 1868 } |
1869 while (element != null && element.isSynthesized) { | 1869 while (element != null && element.isSynthesized) { |
1870 element = element.enclosingElement; | 1870 element = element.enclosingElement; |
1871 } | 1871 } |
1872 if (element != null && | 1872 if (element != null && |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2190 if (_otherDependencies == null) { | 2190 if (_otherDependencies == null) { |
2191 _otherDependencies = new Setlet<Element>(); | 2191 _otherDependencies = new Setlet<Element>(); |
2192 } | 2192 } |
2193 _otherDependencies.add(element.implementation); | 2193 _otherDependencies.add(element.implementation); |
2194 } | 2194 } |
2195 | 2195 |
2196 Iterable<Element> get otherDependencies { | 2196 Iterable<Element> get otherDependencies { |
2197 return _otherDependencies != null ? _otherDependencies : const <Element>[]; | 2197 return _otherDependencies != null ? _otherDependencies : const <Element>[]; |
2198 } | 2198 } |
2199 } | 2199 } |
OLD | NEW |