| OLD | NEW |
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
| 3 library engine.ast; | 3 library engine.ast; |
| 4 import 'dart:collection'; | 4 import 'dart:collection'; |
| 5 import 'java_core.dart'; | 5 import 'java_core.dart'; |
| 6 import 'java_engine.dart'; | 6 import 'java_engine.dart'; |
| 7 import 'error.dart'; | 7 import 'error.dart'; |
| 8 import 'source.dart' show LineInfo; | 8 import 'source.dart' show LineInfo; |
| 9 import 'scanner.dart'; | 9 import 'scanner.dart'; |
| 10 import 'engine.dart' show AnalysisEngine; | 10 import 'engine.dart' show AnalysisEngine; |
| (...skipping 12969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12980 * @param node the AST node within which to search | 12980 * @param node the AST node within which to search |
| 12981 * @return the element that was found | 12981 * @return the element that was found |
| 12982 */ | 12982 */ |
| 12983 ASTNode searchWithin(ASTNode node) { | 12983 ASTNode searchWithin(ASTNode node) { |
| 12984 if (node == null) { | 12984 if (node == null) { |
| 12985 return null; | 12985 return null; |
| 12986 } | 12986 } |
| 12987 try { | 12987 try { |
| 12988 node.accept(this); | 12988 node.accept(this); |
| 12989 } on NodeLocator_NodeFoundException catch (exception) { | 12989 } on NodeLocator_NodeFoundException catch (exception) { |
| 12990 } catch (exception) { | 12990 } on JavaException catch (exception) { |
| 12991 AnalysisEngine.instance.logger.logInformation2("Unable to locate element a
t offset (${_startOffset} - ${_endOffset})", exception); | 12991 AnalysisEngine.instance.logger.logInformation2("Unable to locate element a
t offset (${_startOffset} - ${_endOffset})", exception); |
| 12992 return null; | 12992 return null; |
| 12993 } | 12993 } |
| 12994 return foundNode; | 12994 return foundNode; |
| 12995 } | 12995 } |
| 12996 Object visitNode(ASTNode node) { | 12996 Object visitNode(ASTNode node) { |
| 12997 int start = node.offset; | 12997 int start = node.offset; |
| 12998 int end = start + node.length; | 12998 int end = start + node.length; |
| 12999 if (end < _startOffset) { | 12999 if (end < _startOffset) { |
| 13000 return null; | 13000 return null; |
| 13001 } | 13001 } |
| 13002 if (start > _endOffset) { | 13002 if (start > _endOffset) { |
| 13003 return null; | 13003 return null; |
| 13004 } | 13004 } |
| 13005 try { | 13005 try { |
| 13006 node.visitChildren(this); | 13006 node.visitChildren(this); |
| 13007 } on NodeLocator_NodeFoundException catch (exception) { | 13007 } on NodeLocator_NodeFoundException catch (exception) { |
| 13008 throw exception; | 13008 throw exception; |
| 13009 } catch (exception) { | 13009 } on JavaException catch (exception) { |
| 13010 AnalysisEngine.instance.logger.logInformation2("Exception caught while tra
versing an AST structure.", exception); | 13010 AnalysisEngine.instance.logger.logInformation2("Exception caught while tra
versing an AST structure.", exception); |
| 13011 } | 13011 } |
| 13012 if (start <= _startOffset && _endOffset <= end) { | 13012 if (start <= _startOffset && _endOffset <= end) { |
| 13013 foundNode = node; | 13013 foundNode = node; |
| 13014 throw new NodeLocator_NodeFoundException(); | 13014 throw new NodeLocator_NodeFoundException(); |
| 13015 } | 13015 } |
| 13016 return null; | 13016 return null; |
| 13017 } | 13017 } |
| 13018 } | 13018 } |
| 13019 /** | 13019 /** |
| (...skipping 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14780 return elements[elements.length - 1].endToken; | 14780 return elements[elements.length - 1].endToken; |
| 14781 } | 14781 } |
| 14782 /** | 14782 /** |
| 14783 * Return the node that is the parent of each of the elements in the list. | 14783 * Return the node that is the parent of each of the elements in the list. |
| 14784 * @return the node that is the parent of each of the elements in the list | 14784 * @return the node that is the parent of each of the elements in the list |
| 14785 */ | 14785 */ |
| 14786 ASTNode getOwner() { | 14786 ASTNode getOwner() { |
| 14787 return owner; | 14787 return owner; |
| 14788 } | 14788 } |
| 14789 } | 14789 } |
| OLD | NEW |