| OLD | NEW |
| (Empty) | |
| 1 >>> |
| 2 class Foo { |
| 3 Optional<double> get finiteSignificantCost => isSignificant && cost.value.isFi
nite ? cost : const Optional<double>.absent(); |
| 4 Optional<double> get finiteSignificantCost => isSignificant && cost.value.isFi
nite ? cost : const Optional.absent(); |
| 5 } |
| 6 <<< |
| 7 class Foo { |
| 8 Optional<double> get finiteSignificantCost => |
| 9 isSignificant && cost.value.isFinite |
| 10 ? cost |
| 11 : const Optional<double>.absent(); |
| 12 Optional<double> get finiteSignificantCost => |
| 13 isSignificant && cost.value.isFinite ? cost : const Optional.absent(); |
| 14 } |
| 15 >>> (indent 4) |
| 16 main() { |
| 17 this.changes.exec(); |
| 18 Valids.exist(doneSearch) |
| 19 ? doneSearch(err) |
| 20 : null; |
| 21 } |
| 22 <<< |
| 23 main() { |
| 24 this.changes.exec(); |
| 25 Valids.exist(doneSearch) ? doneSearch(err) : null; |
| 26 } |
| 27 >>> (indent 6) |
| 28 main() { |
| 29 var openParensMatch = new RegExp(r'\(').allMatches(matchStr), |
| 30 closeParensMatch = new RegExp(r'\)').allMatches(matchStr), |
| 31 numOpenParens = |
| 32 (openParensMatch != null && openParensMatch.length != null) ? 1 : 0, |
| 33 numCloseParens = |
| 34 (closeParensMatch != null && closeParensMatch.length != null) |
| 35 ? 1 |
| 36 : 0; |
| 37 } |
| 38 <<< |
| 39 main() { |
| 40 var openParensMatch = new RegExp(r'\(').allMatches(matchStr), |
| 41 closeParensMatch = new RegExp(r'\)').allMatches(matchStr), |
| 42 numOpenParens = |
| 43 (openParensMatch != null && openParensMatch.length != null) |
| 44 ? 1 |
| 45 : 0, |
| 46 numCloseParens = |
| 47 (closeParensMatch != null && closeParensMatch.length != null) |
| 48 ? 1 |
| 49 : 0; |
| 50 } |
| 51 >>> (indent 4) |
| 52 main() { |
| 53 tree.Node definition = new tree.FunctionExpression( |
| 54 makeIdentifier(param.name), |
| 55 makeParameters(param.parameters), |
| 56 null, // body |
| 57 param.type == null |
| 58 ? null |
| 59 : makeType(param.type), |
| 60 makeEmptyModifiers(), // TODO: Function parameter modifiers? |
| 61 null, // initializers |
| 62 null, // get/set |
| 63 null); // async modifier |
| 64 } |
| 65 <<< |
| 66 main() { |
| 67 tree.Node definition = new tree.FunctionExpression( |
| 68 makeIdentifier(param.name), |
| 69 makeParameters(param.parameters), |
| 70 null, // body |
| 71 param.type == null ? null : makeType(param.type), |
| 72 makeEmptyModifiers(), // TODO: Function parameter modifiers? |
| 73 null, // initializers |
| 74 null, // get/set |
| 75 null); // async modifier |
| 76 } |
| 77 >>> (indent 2) |
| 78 main() { |
| 79 ConstantExpression constant = new TypeConstantExpression( |
| 80 // TODO(johnniwinther): Use [type] when evaluation of constants is done |
| 81 // directly on the constant expressions. |
| 82 node.isCall |
| 83 ? coreTypes.typeType |
| 84 : type); |
| 85 } |
| 86 <<< |
| 87 main() { |
| 88 ConstantExpression constant = new TypeConstantExpression( |
| 89 // TODO(johnniwinther): Use [type] when evaluation of constants is done |
| 90 // directly on the constant expressions. |
| 91 node.isCall ? coreTypes.typeType : type); |
| 92 } |
| OLD | NEW |