Skip to content

Commit

Permalink
Merge pull request #70 from arezaii/add-attributes-support
Browse files Browse the repository at this point in the history
add support for lexing attributes. The corresponding
changes were added to pygments in PR
pygments/pygments#2376
  • Loading branch information
arezaii committed Mar 30, 2023
2 parents 4cffb63 + e31d17d commit 0976042
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sphinxcontrib/chapeldomain/chapel.py
Expand Up @@ -73,6 +73,7 @@ class ChapelLexer(RegexLexer):
(words(known_types, suffix=r'\b'), Keyword.Type),
(words((*type_modifiers, *other_keywords), suffix=r'\b'), Keyword),

(r'@', Keyword, 'attributename'),
(r'(iter)((?:\s)+)', bygroups(Keyword, Text), 'procname'),
(r'(proc)((?:\s)+)', bygroups(Keyword, Text), 'procname'),
(r'(operator)((?:\s)+)', bygroups(Keyword, Text), 'procname'),
Expand Down Expand Up @@ -134,4 +135,7 @@ class ChapelLexer(RegexLexer):
(words(known_types, suffix=r'\b'), Keyword.Type),
(r'[^()]*', Name.Other, '#pop'),
],
'attributename': [
(r'[a-zA-Z_][.\w$]*', Name.Decorator, '#pop'),
],
}

0 comments on commit 0976042

Please sign in to comment.