| Index: compiler/java/com/google/dart/compiler/parser/DartParser.java
|
| ===================================================================
|
| --- compiler/java/com/google/dart/compiler/parser/DartParser.java (revision 409)
|
| +++ compiler/java/com/google/dart/compiler/parser/DartParser.java (working copy)
|
| @@ -183,7 +183,7 @@
|
| private DartParser(Source source, DartCompilerListener listener) throws IOException {
|
| this(source, source.getSourceReader(), listener);
|
| }
|
| -
|
| +
|
| private DartParser(Source source,
|
| Reader sourceReader,
|
| DartCompilerListener listener) throws IOException {
|
| @@ -274,7 +274,7 @@
|
|
|
| /**
|
| * A version of the parser which only parses the directives of a library.
|
| - *
|
| + *
|
| * TODO(jbrosenberg): consider parsing the whole file here, in order to avoid
|
| * duplicate work. Probably requires removing use of LibraryUnit's, etc.
|
| * Also, this minimal parse does have benefit in the incremental compilation
|
| @@ -640,7 +640,7 @@
|
|
|
| /**
|
| * Parse a field or method, which may be inside a class or at the top level.
|
| - *
|
| + *
|
| * <pre>
|
| * // This rule is organized in a way that may not be most readable, but
|
| * // gives the best error messages.
|
| @@ -730,7 +730,7 @@
|
| * | NEGATE
|
| * ;
|
| * </pre>
|
| - *
|
| + *
|
| * @param allowStatic true if the static modifier is allowed
|
| * @return a {@link DartNode} representing the grammar fragment above
|
| */
|
| @@ -2713,13 +2713,9 @@
|
| if (peek(1) == Token.LPAREN && optionalPseudoKeyword(ASSERT_KEYWORD)) {
|
| consume(Token.LPAREN);
|
| DartExpression expression = parseConditionalExpression();
|
| - DartExpression message = null;
|
| - if (optional(Token.COMMA)) {
|
| - message = parseConditionalExpression();
|
| - }
|
| expectCloseParen();
|
| expectStatmentTerminator();
|
| - return done(new DartAssertion(expression, message));
|
| + return done(new DartAssertion(expression));
|
| }
|
| DartExpression expression = parseExpression();
|
| expectStatmentTerminator();
|
| @@ -2823,7 +2819,7 @@
|
| * <p>
|
| * Note that this is a crude heuristic that needs to be improved for better
|
| * error recovery.
|
| - *
|
| + *
|
| * @return a {@link DartSyntheticErrorStatement}
|
| */
|
| private DartStatement parseErrorStatement() {
|
| @@ -2878,7 +2874,7 @@
|
| break;
|
| }
|
|
|
| - while (true) {
|
| + while (true) {
|
| switch (peek(0)) {
|
| case EOS:
|
| return;
|
| @@ -2896,7 +2892,7 @@
|
| return;
|
| }
|
| break;
|
| -
|
| +
|
| case LBRACE:
|
| ++braceCount;
|
| //$FALL-THROUGH$
|
| @@ -2909,7 +2905,7 @@
|
|
|
| /**
|
| * Report an error without advancing past the next token.
|
| - *
|
| + *
|
| * @param errCode the error code to report, which may take a string parameter
|
| * containing the actual token found
|
| */
|
| @@ -3182,7 +3178,7 @@
|
| done = true;
|
| done(null);
|
| } else {
|
| - if (peek(0) != Token.EOS) {
|
| + if (peek(0) != Token.EOS) {
|
| members.add(parseDefaultMember(label));
|
| }
|
| expectCloseBrace();
|
|
|