| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012, the Dart project authors. | 2 * Copyright (c) 2012, the Dart project authors. |
| 3 * | 3 * |
| 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except | 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except |
| 5 * in compliance with the License. You may obtain a copy of the License at | 5 * in compliance with the License. You may obtain a copy of the License at |
| 6 * | 6 * |
| 7 * http://www.eclipse.org/legal/epl-v10.html | 7 * http://www.eclipse.org/legal/epl-v10.html |
| 8 * | 8 * |
| 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License | 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License |
| 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express | 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express |
| (...skipping 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1543 | 1543 |
| 1544 public void test_parseCompilationUnit_abstractAsPrefix_parameterized() throws
Exception { | 1544 public void test_parseCompilationUnit_abstractAsPrefix_parameterized() throws
Exception { |
| 1545 CompilationUnit unit = parse( | 1545 CompilationUnit unit = parse( |
| 1546 "parseCompilationUnit", | 1546 "parseCompilationUnit", |
| 1547 "abstract<dynamic> _abstract = new abstract.A();"); | 1547 "abstract<dynamic> _abstract = new abstract.A();"); |
| 1548 assertNull(unit.getScriptTag()); | 1548 assertNull(unit.getScriptTag()); |
| 1549 assertSize(0, unit.getDirectives()); | 1549 assertSize(0, unit.getDirectives()); |
| 1550 assertSize(1, unit.getDeclarations()); | 1550 assertSize(1, unit.getDeclarations()); |
| 1551 } | 1551 } |
| 1552 | 1552 |
| 1553 public void test_parseCompilationUnit_builtIn_asFunctionName() throws Exceptio
n { |
| 1554 parse("parseCompilationUnit", "abstract(x) => 0;"); |
| 1555 parse("parseCompilationUnit", "as(x) => 0;"); |
| 1556 parse("parseCompilationUnit", "dynamic(x) => 0;"); |
| 1557 parse("parseCompilationUnit", "export(x) => 0;"); |
| 1558 parse("parseCompilationUnit", "external(x) => 0;"); |
| 1559 parse("parseCompilationUnit", "factory(x) => 0;"); |
| 1560 parse("parseCompilationUnit", "get(x) => 0;"); |
| 1561 parse("parseCompilationUnit", "implements(x) => 0;"); |
| 1562 parse("parseCompilationUnit", "import(x) => 0;"); |
| 1563 parse("parseCompilationUnit", "library(x) => 0;"); |
| 1564 parse("parseCompilationUnit", "operator(x) => 0;"); |
| 1565 parse("parseCompilationUnit", "part(x) => 0;"); |
| 1566 parse("parseCompilationUnit", "set(x) => 0;"); |
| 1567 parse("parseCompilationUnit", "static(x) => 0;"); |
| 1568 parse("parseCompilationUnit", "typedef(x) => 0;"); |
| 1569 } |
| 1570 |
| 1553 public void test_parseCompilationUnit_directives_multiple() throws Exception { | 1571 public void test_parseCompilationUnit_directives_multiple() throws Exception { |
| 1554 CompilationUnit unit = parse("parseCompilationUnit", "library l;\npart 'a.da
rt';"); | 1572 CompilationUnit unit = parse("parseCompilationUnit", "library l;\npart 'a.da
rt';"); |
| 1555 assertNull(unit.getScriptTag()); | 1573 assertNull(unit.getScriptTag()); |
| 1556 assertSize(2, unit.getDirectives()); | 1574 assertSize(2, unit.getDirectives()); |
| 1557 assertSize(0, unit.getDeclarations()); | 1575 assertSize(0, unit.getDeclarations()); |
| 1558 } | 1576 } |
| 1559 | 1577 |
| 1560 public void test_parseCompilationUnit_directives_single() throws Exception { | 1578 public void test_parseCompilationUnit_directives_single() throws Exception { |
| 1561 CompilationUnit unit = parse("parseCompilationUnit", "library l;"); | 1579 CompilationUnit unit = parse("parseCompilationUnit", "library l;"); |
| 1562 assertNull(unit.getScriptTag()); | 1580 assertNull(unit.getScriptTag()); |
| (...skipping 3315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4878 // Parse the source. | 4896 // Parse the source. |
| 4879 // | 4897 // |
| 4880 Parser parser = new Parser(null, listener); | 4898 Parser parser = new Parser(null, listener); |
| 4881 return (Token) invokeParserMethodImpl( | 4899 return (Token) invokeParserMethodImpl( |
| 4882 parser, | 4900 parser, |
| 4883 methodName, | 4901 methodName, |
| 4884 new Object[] {tokenStream}, | 4902 new Object[] {tokenStream}, |
| 4885 tokenStream); | 4903 tokenStream); |
| 4886 } | 4904 } |
| 4887 } | 4905 } |
| OLD | NEW |