J: treat ?. as a single operator by ekanshul · Pull Request #3412 · pygments/pygments · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGES
5 changes: 5 additions & 0 deletions pygments/lexers/j.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ class JLexer(RegexLexer):
# Copula
(r'=[.:]', Operator),

# Two-character primitives that would otherwise split into
# a pair of single-character operators (e.g. ?. roll/deal
# with a fixed seed).
(r'\?\.', Operator),

# Builtins
(r'[-=+*#$%@!~`^&";:.,<>{}\[\]\\|/?]', Operator),

Expand Down
3 changes: 1 addition & 2 deletions tests/snippets/j/test_deal_operator_fixed_seed.txt