| 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 codegen.dart; |   5 library codegen.dart; | 
|   6  |   6  | 
|   7 import 'api.dart'; |   7 import 'api.dart'; | 
|   8  |   8  | 
|   9 /** |   9 /** | 
|  10  * Visitor specialized for generating Dart code. |  10  * Visitor specialized for generating Dart code. | 
| (...skipping 30 matching lines...) Expand all  Loading... | 
|  41     } else if (type is TypeList) { |  41     } else if (type is TypeList) { | 
|  42       return 'List<${dartType(type.itemType)}>'; |  42       return 'List<${dartType(type.itemType)}>'; | 
|  43     } else if (type is TypeMap) { |  43     } else if (type is TypeMap) { | 
|  44       return 'Map<${dartType(type.keyType)}, ${dartType(type.valueType)}>'; |  44       return 'Map<${dartType(type.keyType)}, ${dartType(type.valueType)}>'; | 
|  45     } else if (type is TypeUnion) { |  45     } else if (type is TypeUnion) { | 
|  46       return 'dynamic'; |  46       return 'dynamic'; | 
|  47     } else { |  47     } else { | 
|  48       throw new Exception("Can't convert to a dart type"); |  48       throw new Exception("Can't convert to a dart type"); | 
|  49     } |  49     } | 
|  50   } |  50   } | 
|  51 } |  51 } | 
| OLD | NEW |