diff options
author | Russell Sim <russell.sim@gmail.com> | 2013-04-23 19:39:56 +1000 |
---|---|---|
committer | Russell Sim <russell.sim@gmail.com> | 2013-04-23 19:39:56 +1000 |
commit | 60099ed0df235993076892c7816b438bedce8c47 (patch) | |
tree | 1386ac376725113c0aeb54d77266e0bf9f21aff2 | |
parent | 690efaf0304427ab5ab023c67b27459beccc4b15 (diff) | |
download | pygments-60099ed0df235993076892c7816b438bedce8c47.tar.gz |
Added 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" |