Issue #759 resolved

Scheme and square brackets

Anonymous created an issue

Many Schemes allow the use of square brackets in addition to parenthesis (these are even part of newer revisions R6RS and R7RS). The current lexer marks square brackets as syntax errors. A patch is attached.

Kind regards, Ian

Comments (2)

  1. Anonymous

    Can't seem to attach the patch so here:

    diff -r 96e8b9cb83ef -r 2d8718b5a7ee pygments/lexers/functional.py
    --- a/pygments/lexers/functional.py	Thu Apr 05 10:27:51 2012 -0700
    +++ b/pygments/lexers/functional.py	Sun Apr 15 22:46:44 2012 -0400
    @@ -145,6 +145,7 @@
     
                 # the famous parentheses!
                 (r'(\(|\))', Punctuation),
    +            (r'(\[|\])', Punctuation),
             ],
         }
    
  2. Log in to comment