| Index: compiler/java/com/google/dart/compiler/parser/DartParser.java
|
| ===================================================================
|
| --- compiler/java/com/google/dart/compiler/parser/DartParser.java (revision 4968)
|
| +++ compiler/java/com/google/dart/compiler/parser/DartParser.java (working copy)
|
| @@ -617,7 +617,8 @@
|
| DartStringLiteral nativeName = null;
|
| if (optionalPseudoKeyword(NATIVE_KEYWORD)) {
|
| if (superType != null) {
|
| - reportError(position(), ParserErrorCode.NATIVE_MUST_NOT_EXTEND);
|
| + // dom_frog.dart has this situation
|
| + //reportError(position(), ParserErrorCode.NATIVE_MUST_NOT_EXTEND);
|
| }
|
| if (isParsingInterface) {
|
| reportError(position(), ParserErrorCode.NATIVE_ONLY_CLASS);
|
| @@ -1212,15 +1213,16 @@
|
| if (!corelibParse) {
|
| reportError(position(), ParserErrorCode.NATIVE_ONLY_CORE_LIB);
|
| }
|
| - if (optional(Token.SEMICOLON)) {
|
| - return done(new DartNativeBlock());
|
| - } else if (match(Token.LBRACE) || match(Token.ARROW)) {
|
| - if (!modifiers.isStatic()) {
|
| - reportError(position(), ParserErrorCode.EXPORTED_FUNCTIONS_MUST_BE_STATIC);
|
| - }
|
| + if (match(Token.STRING)) {
|
| + parseString();
|
| + }
|
| + if (match(Token.LBRACE) || match(Token.ARROW)) {
|
| + // dom_frog.dart has non-static native methods with string and block
|
| + //if (!modifiers.isStatic()) {
|
| + // reportError(position(), ParserErrorCode.EXPORTED_FUNCTIONS_MUST_BE_STATIC);
|
| + //}
|
| return done(parseFunctionStatementBody(true));
|
| } else {
|
| - parseString();
|
| expect(Token.SEMICOLON);
|
| return done(new DartNativeBlock());
|
| }
|
|
|