diff options
author | Tim Hatch <tim@timhatch.com> | 2013-05-05 23:27:18 -0700 |
---|---|---|
committer | Tim Hatch <tim@timhatch.com> | 2013-05-05 23:27:18 -0700 |
commit | c9855f8191cdc73912c151db662f863e0a8b9df3 (patch) | |
tree | e12d1943630cf3bd7786eb046ca8e45f42d24af4 | |
parent | 271428fe53ddb7537486d8fab61ea1ddfaa9b33e (diff) | |
parent | 60099ed0df235993076892c7816b438bedce8c47 (diff) | |
download | pygments-c9855f8191cdc73912c151db662f863e0a8b9df3.tar.gz |
Merged in russell/pygments-811 (pull request #189)
Added Commol Lisp symbol handling for symbols that begin with :# and ::. Fixes #811
-rw-r--r-- | pygments/lexers/functional.py | 2 | ||||
-rw-r--r-- | tests/examplefiles/type.lisp | 16 |
2 files changed, 18 insertions, 0 deletions
diff --git a/pygments/lexers/functional.py b/pygments/lexers/functional.py index 889e7ec6..613be987 100644 --- a/pygments/lexers/functional.py +++ b/pygments/lexers/functional.py @@ -808,6 +808,8 @@ class CommonLispLexer(RegexLexer): (r'"(\\.|\\\n|[^"\\])*"', String), # quoting (r":" + symbol, String.Symbol), + (r"::" + symbol, String.Symbol), + (r":#" + symbol, String.Symbol), (r"'" + symbol, String.Symbol), (r"'", Operator), (r"`", Operator), diff --git a/tests/examplefiles/type.lisp b/tests/examplefiles/type.lisp index 9c769379..c02c29df 100644 --- a/tests/examplefiles/type.lisp +++ b/tests/examplefiles/type.lisp @@ -1200,3 +1200,19 @@ Henry Baker: (unless (clos::funcallable-instance-p #'clos::class-name) (fmakunbound 'clos::class-name)) + + +(keywordp :junk) + T + +(keywordp ::junk) + T + +(symbol-name ::junk) + "JUNK" + +(symbol-name :#junk) + "#JUNK" + +(symbol-name :#.junk) + "#.JUNK" |