summaryrefslogtreecommitdiffstats
path: root/tools/idl_parser
diff options
context:
space:
mode:
authorjl@opera.com <jl@opera.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-17 20:16:14 +0000
committerjl@opera.com <jl@opera.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-17 20:16:14 +0000
commit0a95574c3ee57123f0860357a9902d86bd605fc7 (patch)
treeb217a4c85126af5b6d85b5387291f173ff252620 /tools/idl_parser
parentba6c7c37e3b26160c440e2b24e2b6d1755c63905 (diff)
downloadchromium_src-0a95574c3ee57123f0860357a9902d86bd605fc7.zip
chromium_src-0a95574c3ee57123f0860357a9902d86bd605fc7.tar.gz
chromium_src-0a95574c3ee57123f0860357a9902d86bd605fc7.tar.bz2
IDL parser: add StaticAttribute production
This is a straight upstream from Blink's IDL parser, which will allow us to drop some overrides there, which in turn will allow us to update this parser to use the grammar of current Web IDL, where static attributes are supported differently (via a StaticMember production that handles both static attributes and static methods.) Preparation for: IDL parser: drop AttributeOrOperation and StaticAttribute overrides https://codereview.chromium.org/336733002/ (in Blink) ...and ultimately for: IDL parser: align with current Web IDL specification https://codereview.chromium.org/329853005/ BUG= Review URL: https://codereview.chromium.org/333853002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277843 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/idl_parser')
-rwxr-xr-xtools/idl_parser/idl_parser.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/idl_parser/idl_parser.py b/tools/idl_parser/idl_parser.py
index 8a682ea..401dc4b 100755
--- a/tools/idl_parser/idl_parser.py
+++ b/tools/idl_parser/idl_parser.py
@@ -434,6 +434,7 @@ class IDLParser(object):
# [30]
def p_AttributeOrOperation(self, p):
"""AttributeOrOperation : STRINGIFIER StringifierAttributeOrOperation
+ | StaticAttribute
| Attribute
| Operation"""
if len(p) > 2:
@@ -451,6 +452,13 @@ class IDLParser(object):
else:
p[0] = ListFromConcat(self.BuildAttribute('STRINGIFIER', p[1]), p[1])
+ # [31.1] FIXME: temporary production as part of moving |static| into
+ # base parser
+ def p_StaticAttribute(self, p):
+ """StaticAttribute : STATIC Attribute"""
+ p[2].AddChildren(self.BuildTrue('STATIC'))
+ p[0] = p[2]
+
# [32]
def p_Attribute(self, p):
"""Attribute : Inherit ReadOnly ATTRIBUTE Type identifier ';'"""