| Index: tools/dom/scripts/idlparser.py
|
| diff --git a/tools/dom/scripts/idlparser.py b/tools/dom/scripts/idlparser.py
|
| index fa905762574eac4cb28c0d308a667c4a23dabdcf..a3ee82f6aee4126f911d326cbf89ccb27c12e1e1 100755
|
| --- a/tools/dom/scripts/idlparser.py
|
| +++ b/tools/dom/scripts/idlparser.py
|
| @@ -68,9 +68,15 @@ class IDLParser(object):
|
| return syntax_switch(
|
| # Web IDL:
|
| OR(Module, Interface, ExceptionDef, TypeDef, ImplStmt,
|
| - ValueTypeDef, Const),
|
| + ValueTypeDef, Const, Enum),
|
| # WebKit:
|
| - OR(Module, Interface))
|
| + OR(Module, Interface, Enum))
|
| +
|
| + def Enum():
|
| + def StringLiteral():
|
| + return re.compile(r'"\w+"')
|
| +
|
| + return ['enum', Id, '{', MAYBE(MANY(StringLiteral, ',')), '}', ';']
|
|
|
| def Module():
|
| return syntax_switch(
|
|
|