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

Side by Side Diff: Source/build/scripts/make_css_property_names.py

Issue 469183002: Move parser-related files in core/css to core/css/parser (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@pp2
Patch Set: Created 6 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/build/scripts/make_css_value_keywords.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 import subprocess 3 import subprocess
4 import sys 4 import sys
5 5
6 import css_properties 6 import css_properties
7 import in_generator 7 import in_generator
8 import license 8 import license
9 9
10 10
11 HEADER_TEMPLATE = """ 11 HEADER_TEMPLATE = """
12 %(license)s 12 %(license)s
13 13
14 #ifndef %(class_name)s_h 14 #ifndef %(class_name)s_h
15 #define %(class_name)s_h 15 #define %(class_name)s_h
16 16
17 #include "core/css/CSSParserMode.h" 17 #include "core/css/parser/CSSParserMode.h"
18 #include "wtf/HashFunctions.h" 18 #include "wtf/HashFunctions.h"
19 #include "wtf/HashTraits.h" 19 #include "wtf/HashTraits.h"
20 #include <string.h> 20 #include <string.h>
21 21
22 namespace WTF { 22 namespace WTF {
23 class AtomicString; 23 class AtomicString;
24 class String; 24 class String;
25 } 25 }
26 26
27 namespace blink { 27 namespace blink {
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 # FIXME: If we could depend on Python 2.7, we would use subprocess.check _output 221 # FIXME: If we could depend on Python 2.7, we would use subprocess.check _output
222 gperf_args = [self.gperf_path, '--key-positions=*', '-P', '-n'] 222 gperf_args = [self.gperf_path, '--key-positions=*', '-P', '-n']
223 gperf_args.extend(['-m', '50']) # Pick best of 50 attempts. 223 gperf_args.extend(['-m', '50']) # Pick best of 50 attempts.
224 gperf_args.append('-D') # Allow duplicate hashes -> More compact code. 224 gperf_args.append('-D') # Allow duplicate hashes -> More compact code.
225 gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subpr ocess.PIPE, universal_newlines=True) 225 gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subpr ocess.PIPE, universal_newlines=True)
226 return gperf.communicate(gperf_input)[0] 226 return gperf.communicate(gperf_input)[0]
227 227
228 228
229 if __name__ == "__main__": 229 if __name__ == "__main__":
230 in_generator.Maker(CSSPropertyNamesWriter).main(sys.argv) 230 in_generator.Maker(CSSPropertyNamesWriter).main(sys.argv)
OLDNEW
« no previous file with comments | « no previous file | Source/build/scripts/make_css_value_keywords.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698