Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: tools/dom/scripts/idlparser.py

Issue 213463003: Strip out gcc preprocessor support (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/dom/scripts/databasebuilder.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/idlparser.py
diff --git a/tools/dom/scripts/idlparser.py b/tools/dom/scripts/idlparser.py
index 852d8db96afaceaabb8afa9892e09615e8165c4e..c10ec5cfb71be10e908c3031c77dca418023b29a 100755
--- a/tools/dom/scripts/idlparser.py
+++ b/tools/dom/scripts/idlparser.py
@@ -385,37 +385,9 @@ class IDLParser(object):
re.compile(r'#.*'),
re.compile(r'/\*.*?\*/', re.S))
- def _pre_process(self, content, defines, includePaths):
- """Pre-processes the content using gcc.
-
- WebKit IDLs require pre-processing by gcc. This is done by invoking
- gcc in a sub-process and capturing the results.
-
- Returns:
- The result of running gcc on the content.
-
- Args:
- content -- text to process.
- defines -- an array of pre-processor defines.
- includePaths -- an array of path strings.
- """
- # FIXME: Handle gcc not found, or any other processing errors
- gcc = 'gcc'
- cmd = [gcc, '-E', '-P', '-C', '-x', 'c++']
- for define in defines:
- cmd.append('-D%s' % define)
- cmd.append('-')
- pipe = subprocess.Popen(cmd, stdin=subprocess.PIPE,
- stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- (content, stderr) = pipe.communicate(content)
- return content
-
- def parse(self, content, defines=[], includePaths=[]):
+ def parse(self, content):
"""Parse the give content string.
- The WebKit IDL syntax also allows gcc pre-processing instructions.
- Lists of defined variables and include paths can be provided.
-
Returns:
An abstract syntax tree (AST).
@@ -425,7 +397,5 @@ class IDLParser(object):
includePaths -- an array of path strings used by the
gcc pre-processor.
"""
- if self._syntax == WEBKIT_SYNTAX:
- content = self._pre_process(content, defines, includePaths)
return self._pegparser.parse(content)
« no previous file with comments | « tools/dom/scripts/databasebuilder.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698