mirror of
https://github.com/adelphes/android-dev-ext.git
synced 2025-12-23 01:48:18 +00:00
allow empty enums
This commit is contained in:
@@ -641,14 +641,12 @@ function sourceType(modifiers, tokens, scope_or_pkgname, typeKind, owner, import
|
|||||||
}
|
}
|
||||||
tokens.expectValue('{');
|
tokens.expectValue('{');
|
||||||
if (type.typeKind === 'enum') {
|
if (type.typeKind === 'enum') {
|
||||||
|
if (!/[;}]/.test(tokens.current.value)) {
|
||||||
enumValueList(type, tokens, imports, typemap);
|
enumValueList(type, tokens, imports, typemap);
|
||||||
|
}
|
||||||
// if there are any declarations following the enum values, the values must be terminated by a semicolon
|
// if there are any declarations following the enum values, the values must be terminated by a semicolon
|
||||||
switch(tokens.current.value) {
|
if(tokens.current.value !== '}') {
|
||||||
case '}':
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
semicolon(tokens);
|
semicolon(tokens);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!tokens.isValue('}')) {
|
if (!tokens.isValue('}')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user