diff options
author | Alastair Houghton <alastair@coriolis-systems.com> | 2012-12-19 13:34:13 +0000 |
---|---|---|
committer | Alastair Houghton <alastair@coriolis-systems.com> | 2012-12-19 13:34:13 +0000 |
commit | 3c081914779ce96aff16717742f522a50af97c66 (patch) | |
tree | 1ef56618ce4a1be5581bc643b16803caff3a28bc /pygments/lexers/_mapping.py | |
parent | 33b11aa673efe7d697841758682170e991cbd8ed (diff) | |
download | pygments-3c081914779ce96aff16717742f522a50af97c66.tar.gz |
Added support for inheritance to RegexLexer, so that subclasses can
selectively inherit tokendefs from their superclasses. Used this new ability
to simplify and unify the C family languages in compiled.py, and to add
support for Objective-C++. Also added code to support autodetection of
language for .h files, with the default being C if no content is provided,
since Objective-C uses the .h file extension.
Diffstat (limited to 'pygments/lexers/_mapping.py')
-rw-r--r-- | pygments/lexers/_mapping.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pygments/lexers/_mapping.py b/pygments/lexers/_mapping.py index 68dd2660..3681ea05 100644 --- a/pygments/lexers/_mapping.py +++ b/pygments/lexers/_mapping.py @@ -188,7 +188,8 @@ LEXERS = { 'NimrodLexer': ('pygments.lexers.compiled', 'Nimrod', ('nimrod', 'nim'), ('*.nim', '*.nimrod'), ('text/x-nimrod',)), 'NumPyLexer': ('pygments.lexers.math', 'NumPy', ('numpy',), (), ()), 'ObjdumpLexer': ('pygments.lexers.asm', 'objdump', ('objdump',), ('*.objdump',), ('text/x-objdump',)), - 'ObjectiveCLexer': ('pygments.lexers.compiled', 'Objective-C', ('objective-c', 'objectivec', 'obj-c', 'objc'), ('*.m',), ('text/x-objective-c',)), + 'ObjectiveCLexer': ('pygments.lexers.compiled', 'Objective-C', ('objective-c', 'objectivec', 'obj-c', 'objc'), ('*.m','*.h'), ('text/x-objective-c',)), + 'ObjectiveCppLexer': ('pygments.lexers.compiled', 'Objective-C++', ('objective-c++', 'objectivec++', 'obj-c++', 'objc++'), ('*.mm','*.hh'), ('text/x-objective-c++',)), 'ObjectiveJLexer': ('pygments.lexers.web', 'Objective-J', ('objective-j', 'objectivej', 'obj-j', 'objj'), ('*.j',), ('text/x-objective-j',)), 'OcamlLexer': ('pygments.lexers.functional', 'OCaml', ('ocaml',), ('*.ml', '*.mli', '*.mll', '*.mly'), ('text/x-ocaml',)), 'OctaveLexer': ('pygments.lexers.math', 'Octave', ('octave',), ('*.m',), ('text/octave',)), |