| 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 // IDL grammar variants. | 5 // IDL grammar variants. |
| 6 const int WEBIDL_SYNTAX = 0; | 6 const int WEBIDL_SYNTAX = 0; |
| 7 const int WEBKIT_SYNTAX = 1; | 7 const int WEBKIT_SYNTAX = 1; |
| 8 const int FREMONTCUT_SYNTAX = 2; | 8 const int FREMONTCUT_SYNTAX = 2; |
| 9 | 9 |
| 10 /** | 10 /** |
| 11 * IDLFile is the top-level node in each IDL file. It may contain modules or | 11 * IDLFile is the top-level node in each IDL file. It may contain modules or |
| 12 * interfaces. | 12 * interfaces. |
| 13 */ | 13 */ |
| 14 class IDLFile extends IDLNode { | 14 class IDLFile extends IDLNode { |
| 15 | 15 |
| 16 String filename; | 16 String filename; |
| 17 List<IDLModule> modules; | 17 List<IDLModule> modules; |
| 18 List<IDLInterface> interfaces; | 18 List<IDLInterface> interfaces; |
| 19 | 19 |
| 20 IDLFile(this.filename, this.modules, this.interfaces); | 20 IDLFile(this.filename, this.modules, this.interfaces); |
| 21 } | 21 } |
| 22 | 22 |
| 23 /** | 23 /** |
| 24 * IDLModule has an id, and may contain interfaces, type defs andimplements | 24 * IDLModule has an id, and may contain interfaces, type defs and implements |
| 25 * statements. | 25 * statements. |
| 26 */ | 26 */ |
| 27 class IDLModule extends IDLNode { | 27 class IDLModule extends IDLNode { |
| 28 String id; | 28 String id; |
| 29 List interfaces; | 29 List interfaces; |
| 30 List typedefs; | 30 List typedefs; |
| 31 List implementsStatements; | 31 List implementsStatements; |
| 32 | 32 |
| 33 IDLModule(String this.id, IDLExtAttrs extAttrs, IDLAnnotations annotations, | 33 IDLModule(String this.id, IDLExtAttrs extAttrs, IDLAnnotations annotations, |
| 34 List<IDLNode> elements) { | 34 List<IDLNode> elements) { |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 OR([MANY(CHAR(' \t\r\n')), | 540 OR([MANY(CHAR(' \t\r\n')), |
| 541 ['//', MANY0([NOT(CHAR('\r\n')), CHAR()])], | 541 ['//', MANY0([NOT(CHAR('\r\n')), CHAR()])], |
| 542 ['#', MANY0([NOT(CHAR('\r\n')), CHAR()])], | 542 ['#', MANY0([NOT(CHAR('\r\n')), CHAR()])], |
| 543 ['/*', MANY0([NOT('*/'), CHAR()]), '*/']]); | 543 ['/*', MANY0([NOT('*/'), CHAR()]), '*/']]); |
| 544 | 544 |
| 545 // Top level - at least one definition. | 545 // Top level - at least one definition. |
| 546 return MANY(Definition); | 546 return MANY(Definition); |
| 547 | 547 |
| 548 } | 548 } |
| 549 } | 549 } |
| OLD | NEW |