OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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('idlparser_test'); | 5 library idlparser_test; |
6 #import('../../../utils/peg/pegparser.dart'); | 6 |
7 #source('idlparser.dart'); | 7 import '../../../utils/peg/pegparser.dart'; |
8 #source('idlrenderer.dart'); | 8 |
| 9 part 'idlparser.dart'; |
| 10 part 'idlrenderer.dart'; |
9 | 11 |
10 main() { | 12 main() { |
11 IDLParser parser = new IDLParser(FREMONTCUT_SYNTAX); | 13 IDLParser parser = new IDLParser(FREMONTCUT_SYNTAX); |
12 Grammar g = parser.grammar; | 14 Grammar g = parser.grammar; |
13 | 15 |
14 var Type = g['Type']; | 16 var Type = g['Type']; |
15 | 17 |
16 show(g, Type, 'int'); | 18 show(g, Type, 'int'); |
17 show(g, Type, 'int ?'); | 19 show(g, Type, 'int ?'); |
18 show(g, Type, 'sequence<int?> ?'); | 20 show(g, Type, 'sequence<int?> ?'); |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 sb.add(printList(x)); | 109 sb.add(printList(x)); |
108 sep = ','; | 110 sep = ','; |
109 } | 111 } |
110 sb.add(']'); | 112 sb.add(']'); |
111 return sb.toString(); | 113 return sb.toString(); |
112 } | 114 } |
113 if (item == null) | 115 if (item == null) |
114 return 'null'; | 116 return 'null'; |
115 return item.toString(); | 117 return item.toString(); |
116 } | 118 } |
OLD | NEW |