| OLD | NEW |
| 1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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 immic.plugins.idl; | 5 library immic.plugins.idl; |
| 6 | 6 |
| 7 import 'dart:core' hide Type; | 7 import 'dart:core' hide Type; |
| 8 import 'dart:io' show Platform, File; | 8 import 'dart:io' show Platform, File; |
| 9 | 9 |
| 10 import 'package:path/path.dart' show basenameWithoutExtension, join, dirname; | 10 import 'package:path/path.dart' show basenameWithoutExtension, join, dirname; |
| 11 import 'package:strings/strings.dart' as strings; | 11 import 'package:strings/strings.dart' as strings; |
| 12 | 12 |
| 13 import 'shared.dart'; | 13 import 'shared.dart'; |
| 14 import '../emitter.dart'; | 14 import '../emitter.dart'; |
| 15 import '../struct_layout.dart'; | 15 import '../struct_layout.dart'; |
| 16 import '../primitives.dart' as primitives; | 16 import '../primitives.dart' as primitives; |
| 17 | 17 |
| 18 const COPYRIGHT = """ | 18 const COPYRIGHT = """ |
| 19 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 19 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
| 20 // for details. All rights reserved. Use of this source code is governed by a | 20 // for details. All rights reserved. Use of this source code is governed by a |
| 21 // BSD-style license that can be found in the LICENSE.md file. | 21 // BSD-style license that can be found in the LICENSE.md file. |
| 22 """; | 22 """; |
| 23 | 23 |
| 24 void generate(String path, | 24 void generate(String path, |
| 25 Map<String, Unit> units, | 25 Map<String, Unit> units, |
| 26 String outputDirectory) { | 26 String outputDirectory) { |
| 27 _IDLVisitor visitor = new _IDLVisitor(path); | 27 _IDLVisitor visitor = new _IDLVisitor(path); |
| 28 visitor.visitUnits(units); | 28 visitor.visitUnits(units); |
| 29 String content = visitor.buffer.toString(); | 29 String content = visitor.buffer.toString(); |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 writeln('struct Action${suffix}Args {'); | 226 writeln('struct Action${suffix}Args {'); |
| 227 int i = 0; | 227 int i = 0; |
| 228 writeln(' uint16 id;'); | 228 writeln(' uint16 id;'); |
| 229 for (Type formal in formals) { | 229 for (Type formal in formals) { |
| 230 writeln(' ${formal.identifier} arg${i++};'); | 230 writeln(' ${formal.identifier} arg${i++};'); |
| 231 } | 231 } |
| 232 writeln('}'); | 232 writeln('}'); |
| 233 } | 233 } |
| 234 } | 234 } |
| 235 } | 235 } |
| OLD | NEW |