OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2011 Google Inc. All rights reserved. | 2 # Copyright (c) 2011 Google Inc. All rights reserved. |
3 # Copyright (c) 2012 Intel Corporation. All rights reserved. | 3 # Copyright (c) 2012 Intel Corporation. All rights reserved. |
4 # | 4 # |
5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
7 # met: | 7 # met: |
8 # | 8 # |
9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 if pos == 1: | 107 if pos == 1: |
108 return str[0].lower() + str[1:] | 108 return str[0].lower() + str[1:] |
109 if pos < len(str): | 109 if pos < len(str): |
110 pos -= 1 | 110 pos -= 1 |
111 possible_abbreviation = str[0:pos] | 111 possible_abbreviation = str[0:pos] |
112 if possible_abbreviation not in Capitalizer.ABBREVIATION: | 112 if possible_abbreviation not in Capitalizer.ABBREVIATION: |
113 raise Exception("Unknown abbreviation %s" % possible_abbreviation) | 113 raise Exception("Unknown abbreviation %s" % possible_abbreviation) |
114 str = possible_abbreviation.lower() + str[pos:] | 114 str = possible_abbreviation.lower() + str[pos:] |
115 return str | 115 return str |
116 | 116 |
117 ABBREVIATION = frozenset(["XHR", "DOM", "CSS"]) | 117 ABBREVIATION = frozenset(["XHR", "DOM", "CSS", "IO"]) |
118 | 118 |
119 VALIDATOR_IFDEF_NAME = "ENABLE(ASSERT)" | 119 VALIDATOR_IFDEF_NAME = "ENABLE(ASSERT)" |
120 | 120 |
121 | 121 |
122 class DomainNameFixes: | 122 class DomainNameFixes: |
123 @staticmethod | 123 @staticmethod |
124 def get_fixed_data(domain_name): | 124 def get_fixed_data(domain_name): |
125 return Capitalizer.upper_camel_case_to_lower(domain_name) + "Agent" | 125 return Capitalizer.upper_camel_case_to_lower(domain_name) + "Agent" |
126 | 126 |
127 class RawTypes(object): | 127 class RawTypes(object): |
(...skipping 1990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2118 validatorIfdefName=VALIDATOR_IFDEF_NAME)) | 2118 validatorIfdefName=VALIDATOR_IFDEF_NAME)) |
2119 | 2119 |
2120 backend_h_file.close() | 2120 backend_h_file.close() |
2121 backend_cpp_file.close() | 2121 backend_cpp_file.close() |
2122 | 2122 |
2123 frontend_h_file.close() | 2123 frontend_h_file.close() |
2124 frontend_cpp_file.close() | 2124 frontend_cpp_file.close() |
2125 | 2125 |
2126 typebuilder_h_file.close() | 2126 typebuilder_h_file.close() |
2127 typebuilder_cpp_file.close() | 2127 typebuilder_cpp_file.close() |
OLD | NEW |