diff options
author | Amr Hesham <amr96@programmer.net> | 2023-03-02 15:44:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-02 14:44:12 +0100 |
commit | 2a0503bf066510a3f0af6c7112d623d17a5058b7 (patch) | |
tree | 05288082305ebd29824f637a188234bbf3c2a258 /pygments/lexers | |
parent | 12a4d51be7f931cffca4dc9e6ca07ece75e8352a (diff) | |
download | pygments-git-2a0503bf066510a3f0af6c7112d623d17a5058b7.tar.gz |
Add support for more declarations and access modifiers in Carbon lexer (#2366)
Diffstat (limited to 'pygments/lexers')
-rw-r--r-- | pygments/lexers/carbon.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pygments/lexers/carbon.py b/pygments/lexers/carbon.py index 3ecd6153..c7bf43ef 100644 --- a/pygments/lexers/carbon.py +++ b/pygments/lexers/carbon.py @@ -41,12 +41,13 @@ class CarbonLexer(RegexLexer): # Declaration (r'(package|import|api|namespace|library)\b', Keyword.Namespace), (r'(abstract|alias|fn|class|interface|let|var|virtual|external|' - r'base|addr|extends)\b', Keyword.Declaration), + r'base|addr|extends|choice)\b', Keyword.Declaration), # Keywords (words(('as', 'or', 'not', 'and', 'break', 'continue', 'case', 'default', 'if', 'else', 'destructor', 'for', 'forall', - 'while', 'where', 'then', 'in', 'is', 'return', - 'returned'), suffix=r'\b'), Keyword), + 'while', 'where', 'then', 'in', 'is', 'return', 'returned', + 'friend', 'partial', 'private', 'protected', 'observe', + 'override', 'Self'), suffix=r'\b'), Keyword), (r'(self)\b', Keyword.Pseudo), (r'(true|false)\b', Keyword.Constant), (r'(auto|bool|string|i8|i16|i32|i64|u8|u16|u32|u64|' |