diff options
| author | Tim Hatch <tim@timhatch.com> | 2015-10-13 11:34:10 -0700 |
|---|---|---|
| committer | Tim Hatch <tim@timhatch.com> | 2015-10-13 11:34:10 -0700 |
| commit | fe5643e7d13809ca6eae7ec7e95c03bea6012226 (patch) | |
| tree | eb9cdcfe0a2dadff5a76f4bcc96acb2a72a1f160 /pygments/lexers/c_cpp.py | |
| parent | 483deba6920adf5c56a318acffb88c890656bc70 (diff) | |
| parent | 27e304015dc3882ddb59122e168765775fb0e014 (diff) | |
| download | pygments-fe5643e7d13809ca6eae7ec7e95c03bea6012226.tar.gz | |
Merged in hanachin/pygments-main/add-ruby-filename (pull request #450)
Add Gemfile to RubyLexer filenames
Diffstat (limited to 'pygments/lexers/c_cpp.py')
| -rw-r--r-- | pygments/lexers/c_cpp.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pygments/lexers/c_cpp.py b/pygments/lexers/c_cpp.py index b565b97b..35ea517f 100644 --- a/pygments/lexers/c_cpp.py +++ b/pygments/lexers/c_cpp.py @@ -28,8 +28,10 @@ class CFamilyLexer(RegexLexer): #: optional Comment or Whitespace _ws = r'(?:\s|//.*?\n|/[*].*?[*]/)+' + + # The trailing ?, rather than *, avoids a geometric performance drop here. #: only one /* */ style comment - _ws1 = r'\s*(?:/[*].*?[*]/\s*)*' + _ws1 = r'\s*(?:/[*].*?[*]/\s*)?' tokens = { 'whitespace': [ @@ -202,7 +204,7 @@ class CppLexer(CFamilyLexer): 'export', 'friend', 'mutable', 'namespace', 'new', 'operator', 'private', 'protected', 'public', 'reinterpret_cast', 'restrict', 'static_cast', 'template', 'this', 'throw', 'throws', - 'typeid', 'typename', 'using', 'virtual', + 'try', 'typeid', 'typename', 'using', 'virtual', 'constexpr', 'nullptr', 'decltype', 'thread_local', 'alignas', 'alignof', 'static_assert', 'noexcept', 'override', 'final'), suffix=r'\b'), Keyword), |
