Chromium Code Reviews| Index: compiler/java/com/google/dart/compiler/parser/DartParser.java |
| =================================================================== |
| --- compiler/java/com/google/dart/compiler/parser/DartParser.java (revision 1993) |
| +++ compiler/java/com/google/dart/compiler/parser/DartParser.java (working copy) |
| @@ -1113,11 +1113,15 @@ |
| } |
| if (optional(Token.SEMICOLON)) { |
| return done(new DartNativeBlock()); |
| - } else { |
| + } else if (match(Token.LBRACE) || match(Token.ARROW)) { |
| if (!modifiers.isStatic()) { |
| reportError(position(), ParserErrorCode.EXPORTED_FUNCTIONS_MUST_BE_STATIC); |
|
Bill Hesse
2011/12/05 12:27:54
This error, exported functions must be static, is
|
| } |
| return done(parseFunctionStatementBody(true)); |
| + } else { |
| + parseString(); |
| + expect(Token.SEMICOLON); |
| + return done(new DartNativeBlock()); |
| } |
| } |