diff options
author | Phil Hagelberg <phil@hagelb.org> | 2020-09-05 08:54:02 -0700 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2020-09-07 07:57:03 +0200 |
commit | c4a3b82967dd9fc78018fae8a49162ec19c1ee65 (patch) | |
tree | 7222152e3f273d204f1d44faa32f7aa4348a0a84 /pygments/lexers/lisp.py | |
parent | 080bbeb859d3346c221f7dcac1ae1822676bec6f (diff) | |
download | pygments-git-c4a3b82967dd9fc78018fae8a49162ec19c1ee65.tar.gz |
Update Fennel keywords to catch up to version 0.6.0.
Remove support for single-quoted strings.
Update fennelview example to latest version of library.
Diffstat (limited to 'pygments/lexers/lisp.py')
-rw-r--r-- | pygments/lexers/lisp.py | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/pygments/lexers/lisp.py b/pygments/lexers/lisp.py index cd36aedd..1ecbf9d5 100644 --- a/pygments/lexers/lisp.py +++ b/pygments/lexers/lisp.py @@ -2634,14 +2634,18 @@ class FennelLexer(RegexLexer): # these two lists are taken from fennel-mode.el: # https://gitlab.com/technomancy/fennel-mode - # this list is current as of Fennel version 0.1.0. + # this list is current as of Fennel version 0.6.0. special_forms = ( - u'require-macros', u'eval-compiler', - u'do', u'values', u'if', u'when', u'each', u'for', u'fn', u'lambda', - u'λ', u'set', u'global', u'var', u'local', u'let', u'tset', u'doto', - u'set-forcibly!', u'defn', u'partial', u'while', u'or', u'and', u'true', - u'false', u'nil', u'.', u'+', u'..', u'^', u'-', u'*', u'%', u'/', u'>', - u'<', u'>=', u'<=', u'=', u'~=', u'#', u'...', u':', u'->', u'->>', + u'require-macros', u'eval-compiler', u'doc', u'lua', u'hashfn', + u'macro', u'macros', u'import-macros', u'pick-args', u'pick-values', + u'macroexpand', u'macrodebug', u'do', u'values', u'if', u'when', + u'each', u'for', u'fn', u'lambda', u'λ', u'partial', u'while', + u'set', u'global', u'var', u'local', u'let', u'tset', u'set-forcibly!', + u'doto', u'match', u'or', u'and', u'true', u'false', u'nil', u'not', + u'not=', u'.', u'+', u'..', u'^', u'-', u'*', u'%', u'/', u'>', + u'<', u'>=', u'<=', u'=', u'...', u':', u'->', u'->>', u'-?>', + u'-?>>', u'rshift', u'lshift', u'bor', u'band', u'bnot', u'bxor', + u'with-open', u'length' ) # Might be nicer to use the list from _lua_builtins.py but it's unclear how? @@ -2655,8 +2659,9 @@ class FennelLexer(RegexLexer): u'tostring', u'type', u'unpack', u'xpcall' ) - # based on the scheme definition, but disallowing leading digits and commas - valid_name = r'[a-zA-Z_!$%&*+/:<=>?@^~|-][\w!$%&*+/:<=>?@^~|\.-]*' + # based on the scheme definition, but disallowing leading digits and + # commas, and @ is not allowed. + valid_name = r'[a-zA-Z_!$%&*+/:<=>?^~|-][\w!$%&*+/:<=>?^~|\.-]*' tokens = { 'root': [ @@ -2668,7 +2673,6 @@ class FennelLexer(RegexLexer): (r'-?\d+', Number.Integer), (r'"(\\\\|\\"|[^"])*"', String), - (r"'(\\\\|\\'|[^'])*'", String), # these are technically strings, but it's worth visually # distinguishing them because their intent is different |