From 91d2dc0121afc20a0071f91dc09e93385dc8e130 Mon Sep 17 00:00:00 2001 From: Chris Hathhorn Date: Fri, 4 Oct 2019 11:56:05 -0500 Subject: [PATCH 1/2] Update __init__.py Allow dashes in ids and tags. --- pygments/pygments_extk/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygments/pygments_extk/__init__.py b/pygments/pygments_extk/__init__.py index d6c54a4..43c7a6d 100644 --- a/pygments/pygments_extk/__init__.py +++ b/pygments/pygments_extk/__init__.py @@ -25,8 +25,8 @@ class ExtKLexer(RegexLexer): (r'"(\\\\|\\"|[^"])*"', String), ], 'identifiers': [ - (r'[$@%.#]*[a-zA-Z_][a-zA-Z_0-9]*', Name.Variable), - (r'', Name.Tag), + (r'[$@%.#]*[a-zA-Z_][a-zA-Z_0-9-]*', Name.Variable), + (r'', Name.Tag), ], 'numbers': [ (r'[+-]?[0-9]+', Number.Integer), From de6456f5f63a71c166152a83b3feb00a17237d5a Mon Sep 17 00:00:00 2001 From: Chris Hathhorn Date: Fri, 4 Oct 2019 12:04:28 -0500 Subject: [PATCH 2/2] Few more keywords. --- pygments/pygments_extk/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygments/pygments_extk/__init__.py b/pygments/pygments_extk/__init__.py index 43c7a6d..48d62ef 100644 --- a/pygments/pygments_extk/__init__.py +++ b/pygments/pygments_extk/__init__.py @@ -17,7 +17,7 @@ class ExtKLexer(RegexLexer): (r'//.*?\n', Comment.Single), ], 'keywords': [ - (words(('kmod', 'endkm', 'including', 'subsort', 'eq', 'ceq', 'load', 'when'), suffix = r'\b'), Keyword), + (words(('kmod', 'endkm', 'including', 'subsort', 'eq', 'ceq', 'load', 'when', 'requires', 'module', 'endmodule', 'imports'), suffix = r'\b'), Keyword), (words(('syntax', 'sort', 'op', 'rule'), suffix = r'\b'), Keyword.Declaration), (words(('If', 'then', 'else', 'Let', 'Do', "Return"), suffix = r'\b'), Keyword), ],