mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:29:48 +00:00
Fix for an NPE for cases where the native keyword on a class is not followed by a string identifier.
Review URL: http://codereview.chromium.org//9109019 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3011 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
ff8a1713e4
commit
e7469aa059
|
@ -606,8 +606,9 @@ public class DartParser extends CompletionHooksParserBase {
|
|||
DartStringLiteral nativeName = null;
|
||||
if (!isParsingInterface && optionalPseudoKeyword(NATIVE_KEYWORD)) {
|
||||
beginLiteral();
|
||||
expect(Token.STRING);
|
||||
nativeName = done(DartStringLiteral.get(ctx.getTokenString()));
|
||||
if (expect(Token.STRING)) {
|
||||
nativeName = done(DartStringLiteral.get(ctx.getTokenString()));
|
||||
}
|
||||
if (superType != null) {
|
||||
reportError(position(), ParserErrorCode.EXTENDED_NATIVE_CLASS);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue