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.parser; | 3 library engine.parser; |
4 import 'dart:collection'; | 4 import 'dart:collection'; |
5 import 'java_core.dart'; | 5 import 'java_core.dart'; |
6 import 'instrumentation.dart'; | 6 import 'instrumentation.dart'; |
7 import 'error.dart'; | 7 import 'error.dart'; |
8 import 'source.dart'; | 8 import 'source.dart'; |
9 import 'scanner.dart'; | 9 import 'scanner.dart'; |
10 import 'ast.dart'; | 10 import 'ast.dart'; |
(...skipping 6313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6324 _writer.print(';'); | 6324 _writer.print(';'); |
6325 return null; | 6325 return null; |
6326 } | 6326 } |
6327 Object visitExtendsClause(ExtendsClause node) { | 6327 Object visitExtendsClause(ExtendsClause node) { |
6328 _writer.print("extends "); | 6328 _writer.print("extends "); |
6329 visit(node.superclass); | 6329 visit(node.superclass); |
6330 return null; | 6330 return null; |
6331 } | 6331 } |
6332 Object visitFieldDeclaration(FieldDeclaration node) { | 6332 Object visitFieldDeclaration(FieldDeclaration node) { |
6333 visit(node.documentationComment); | 6333 visit(node.documentationComment); |
6334 visit8(node.keyword, " "); | 6334 visit8(node.staticKeyword, " "); |
6335 visit(node.fields); | 6335 visit(node.fields); |
6336 _writer.print(";"); | 6336 _writer.print(";"); |
6337 return null; | 6337 return null; |
6338 } | 6338 } |
6339 Object visitFieldFormalParameter(FieldFormalParameter node) { | 6339 Object visitFieldFormalParameter(FieldFormalParameter node) { |
6340 visit8(node.keyword, " "); | 6340 visit8(node.keyword, " "); |
6341 visit6(node.type, " "); | 6341 visit6(node.type, " "); |
6342 _writer.print("this."); | 6342 _writer.print("this."); |
6343 visit(node.identifier); | 6343 visit(node.identifier); |
6344 visit(node.parameters); | 6344 visit(node.parameters); |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6521 visit(node.name); | 6521 visit(node.name); |
6522 _writer.print(';'); | 6522 _writer.print(';'); |
6523 nl(); | 6523 nl(); |
6524 return null; | 6524 return null; |
6525 } | 6525 } |
6526 Object visitLibraryIdentifier(LibraryIdentifier node) { | 6526 Object visitLibraryIdentifier(LibraryIdentifier node) { |
6527 _writer.print(node.name); | 6527 _writer.print(node.name); |
6528 return null; | 6528 return null; |
6529 } | 6529 } |
6530 Object visitListLiteral(ListLiteral node) { | 6530 Object visitListLiteral(ListLiteral node) { |
6531 if (node.modifier != null) { | 6531 if (node.constKeyword != null) { |
6532 _writer.print(node.modifier.lexeme); | 6532 _writer.print(node.constKeyword.lexeme); |
6533 _writer.print(' '); | 6533 _writer.print(' '); |
6534 } | 6534 } |
6535 visit6(node.typeArguments, " "); | 6535 visit6(node.typeArguments, " "); |
6536 _writer.print("["); | 6536 _writer.print("["); |
6537 { | 6537 { |
6538 NodeList<Expression> elements = node.elements; | 6538 NodeList<Expression> elements = node.elements; |
6539 if (elements.length < 2 || elements.toString().length < 60) { | 6539 if (elements.length < 2 || elements.toString().length < 60) { |
6540 visitList5(elements, ", "); | 6540 visitList5(elements, ", "); |
6541 } else { | 6541 } else { |
6542 String elementIndent = "${_indentString} "; | 6542 String elementIndent = "${_indentString} "; |
6543 _writer.print("\n"); | 6543 _writer.print("\n"); |
6544 _writer.print(elementIndent); | 6544 _writer.print(elementIndent); |
6545 visitList5(elements, ",\n${elementIndent}"); | 6545 visitList5(elements, ",\n${elementIndent}"); |
6546 } | 6546 } |
6547 } | 6547 } |
6548 _writer.print("]"); | 6548 _writer.print("]"); |
6549 return null; | 6549 return null; |
6550 } | 6550 } |
6551 Object visitMapLiteral(MapLiteral node) { | 6551 Object visitMapLiteral(MapLiteral node) { |
6552 if (node.modifier != null) { | 6552 if (node.constKeyword != null) { |
6553 _writer.print(node.modifier.lexeme); | 6553 _writer.print(node.constKeyword.lexeme); |
6554 _writer.print(' '); | 6554 _writer.print(' '); |
6555 } | 6555 } |
6556 visit6(node.typeArguments, " "); | 6556 visit6(node.typeArguments, " "); |
6557 _writer.print("{"); | 6557 _writer.print("{"); |
6558 visitList5(node.entries, ", "); | 6558 visitList5(node.entries, ", "); |
6559 _writer.print("}"); | 6559 _writer.print("}"); |
6560 return null; | 6560 return null; |
6561 } | 6561 } |
6562 Object visitMapLiteralEntry(MapLiteralEntry node) { | 6562 Object visitMapLiteralEntry(MapLiteralEntry node) { |
6563 visit(node.key); | 6563 visit(node.key); |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6763 return null; | 6763 return null; |
6764 } | 6764 } |
6765 Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { | 6765 Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { |
6766 visit6(node.variables, ";"); | 6766 visit6(node.variables, ";"); |
6767 return null; | 6767 return null; |
6768 } | 6768 } |
6769 Object visitTryStatement(TryStatement node) { | 6769 Object visitTryStatement(TryStatement node) { |
6770 _writer.print("try "); | 6770 _writer.print("try "); |
6771 visit(node.body); | 6771 visit(node.body); |
6772 visitList7(" ", node.catchClauses, " "); | 6772 visitList7(" ", node.catchClauses, " "); |
6773 visit7(" finally ", node.finallyClause); | 6773 visit7(" finally ", node.finallyBlock); |
6774 return null; | 6774 return null; |
6775 } | 6775 } |
6776 Object visitTypeArgumentList(TypeArgumentList node) { | 6776 Object visitTypeArgumentList(TypeArgumentList node) { |
6777 _writer.print('<'); | 6777 _writer.print('<'); |
6778 visitList5(node.arguments, ", "); | 6778 visitList5(node.arguments, ", "); |
6779 _writer.print('>'); | 6779 _writer.print('>'); |
6780 return null; | 6780 return null; |
6781 } | 6781 } |
6782 Object visitTypeName(TypeName node) { | 6782 Object visitTypeName(TypeName node) { |
6783 visit(node.name); | 6783 visit(node.name); |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6980 if ("\n" == separator) { | 6980 if ("\n" == separator) { |
6981 _writer.print("\n"); | 6981 _writer.print("\n"); |
6982 indent(); | 6982 indent(); |
6983 } else if (i > 0) { | 6983 } else if (i > 0) { |
6984 _writer.print(separator); | 6984 _writer.print(separator); |
6985 } | 6985 } |
6986 _writer.print(tokens[i].lexeme); | 6986 _writer.print(tokens[i].lexeme); |
6987 } | 6987 } |
6988 } | 6988 } |
6989 } | 6989 } |
OLD | NEW |