diff options
author | Anteru <bitbucket@ca.sh13.net> | 2019-03-06 18:58:58 +0000 |
---|---|---|
committer | Anteru <bitbucket@ca.sh13.net> | 2019-03-06 18:58:58 +0000 |
commit | 336dc9f7200909200036c80685f9703f40ecd238 (patch) | |
tree | a18e33f30ede25ebfc833ed661edb88014114484 /pygments/lexers/_cocoa_builtins.py | |
parent | b17601caa391fc3587960e160c57eb96c2dde3e0 (diff) | |
parent | bce3a972a54517884bcbd45e09e0d3e911fe53d7 (diff) | |
download | pygments-git-336dc9f7200909200036c80685f9703f40ecd238.tar.gz |
Merged in roskakori/pygments-vbscript (pull request #673)
Added lexer for VBScript
Diffstat (limited to 'pygments/lexers/_cocoa_builtins.py')
-rw-r--r-- | pygments/lexers/_cocoa_builtins.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/pygments/lexers/_cocoa_builtins.py b/pygments/lexers/_cocoa_builtins.py index a4f00d9d..f17ea876 100644 --- a/pygments/lexers/_cocoa_builtins.py +++ b/pygments/lexers/_cocoa_builtins.py @@ -8,7 +8,7 @@ File may be also used as standalone generator for aboves. - :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -40,24 +40,25 @@ if __name__ == '__main__': # pragma: no cover continue headerFilePath = frameworkHeadersDir + f - content = open(headerFilePath).read() - res = re.findall('(?<=@interface )\w+', content) + with open(headerFilePath) as f: + content = f.read() + res = re.findall(r'(?<=@interface )\w+', content) for r in res: all_interfaces.add(r) - res = re.findall('(?<=@protocol )\w+', content) + res = re.findall(r'(?<=@protocol )\w+', content) for r in res: all_protocols.add(r) - res = re.findall('(?<=typedef enum )\w+', content) + res = re.findall(r'(?<=typedef enum )\w+', content) for r in res: all_primitives.add(r) - res = re.findall('(?<=typedef struct )\w+', content) + res = re.findall(r'(?<=typedef struct )\w+', content) for r in res: all_primitives.add(r) - res = re.findall('(?<=typedef const struct )\w+', content) + res = re.findall(r'(?<=typedef const struct )\w+', content) for r in res: all_primitives.add(r) |