Anonymous avatar Anonymous committed 2731c70

Drop the constructs that are meaningless in Clojure (apparently included in the Scheme port)

Comments (0)

Files changed (1)


     # valid names for identifiers
     # well, names can only not consist fully of numbers
     # but this should be good enough for now
-    valid_name = r'[a-zA-Z0-9!$%&*+,/:<=>?@^_~-]+'
+    valid_name = r'[\w!$%*+,<=>?@~-]+'
     tokens = {
         'root' : [
             # numbers
             (r'-?\d+\.\d+', Number.Float),
             (r'-?\d+', Number.Integer),
-            # support for uncommon kinds of numbers -
-            # have to figure out what the characters mean
-            #(r'(#e|#i|#b|#o|#d|#x)[\d.]+', Number),
             # strings, symbols and characters
             (r'"(\\\\|\\"|[^"])*"', String),
             (r"\\([()/'\".'_!§$%& ?;=#+-]{1}|[a-zA-Z0-9]+)", String.Char),
             # constants
-            (r'(#t|#f)', Name.Constant),
             # special operators
-            (r"('|#|`|,@|,|\.)", Operator),
+            (r"('|#|`)", Operator),
             # highlight the keywords
             ('(%s)' % '|'.join([
-            # first variable in a quoted string like
-            # '(this is syntactic sugar)
-            (r"(?<='\()" + valid_name, Name.Variable),
-            (r"(?<=#\()" + valid_name, Name.Variable),
             # highlight the builtins
             ("(?<=\()(%s)" % '|'.join([
                 re.escape(entry) + ' ' for entry in builtins]),
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.