| 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 dart_tree_printer; | 5 library dart_tree_printer; |
| 6 | 6 |
| 7 import 'dart_printer.dart'; | 7 import 'dart_printer.dart'; |
| 8 import '../tree/tree.dart' as tree; | 8 import '../tree/tree.dart' as tree; |
| 9 import '../scanner/scannerlib.dart'; | 9 import '../scanner/scannerlib.dart'; |
| 10 import '../util/util.dart'; | 10 import '../util/util.dart'; |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 precedence = PRIMARY; | 491 precedence = PRIMARY; |
| 492 result = new tree.LiteralSymbol( | 492 result = new tree.LiteralSymbol( |
| 493 hash, | 493 hash, |
| 494 makeList('.', exp.id.split('.').map(makeIdentifier))); | 494 makeList('.', exp.id.split('.').map(makeIdentifier))); |
| 495 } else if (exp is StringConcat) { | 495 } else if (exp is StringConcat) { |
| 496 precedence = PRIMARY; | 496 precedence = PRIMARY; |
| 497 result = unparseStringLiteral(exp); | 497 result = unparseStringLiteral(exp); |
| 498 } else if (exp is This) { | 498 } else if (exp is This) { |
| 499 precedence = CALLEE; | 499 precedence = CALLEE; |
| 500 result = makeIdentifier('this'); | 500 result = makeIdentifier('this'); |
| 501 } else if (exp is Super) { |
| 502 precedence = CALLEE; |
| 503 result = makeIdentifier('super'); |
| 501 } else if (exp is Throw) { | 504 } else if (exp is Throw) { |
| 502 precedence = EXPRESSION; // ??? | 505 precedence = EXPRESSION; // ??? |
| 503 result = new tree.Throw( | 506 result = new tree.Throw( |
| 504 makeExpression(exp.expression), | 507 makeExpression(exp.expression), |
| 505 throwToken, | 508 throwToken, |
| 506 throwToken); // endToken not used by unparser | 509 throwToken); // endToken not used by unparser |
| 507 } else if (exp is TypeOperator) { | 510 } else if (exp is TypeOperator) { |
| 508 precedence = RELATIONAL; | 511 precedence = RELATIONAL; |
| 509 tree.Operator operator; | 512 tree.Operator operator; |
| 510 tree.Node rightOperand = makeType(exp.type); | 513 tree.Node rightOperand = makeType(exp.type); |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 992 printStringChunk(chunk.previous), | 995 printStringChunk(chunk.previous), |
| 993 node); | 996 node); |
| 994 } else { | 997 } else { |
| 995 return node; | 998 return node; |
| 996 } | 999 } |
| 997 } | 1000 } |
| 998 return printStringChunk(output.chunk); | 1001 return printStringChunk(output.chunk); |
| 999 } | 1002 } |
| 1000 | 1003 |
| 1001 } | 1004 } |
| OLD | NEW |