Commits

cormullion committed 9acca4d

strings

Comments (0)

Files changed (1)

 
             # strings, symbols and characters
             (r'"(\\\\|\\"|[^"])*"', String),
-            (r'{(\\\\|\\}|[^}])*}', String),
+            
+            # braces
+            (r"{", String, "bracestring"),
             
             # [text] ... [/text] delimited strings
-            (r'\[text\]*', String.Other, "stringtag"),
+            (r'\[text\]*', String, "tagstring"),
      
             # 'special' operators...
             (r"('|:)", Operator),
             (r'(\(|\))', Punctuation),
         ],
         
-        # one way to do [text]...[/text] delimited strings...
-        'stringtag': [
-            (r'(?s)(.*?)(\[/text\])', String.Other, '#pop'),
-        ],       
+        # braced strings...
+        'bracestring': [
+             ("{", String, "#push"),
+             ("}", String, "#pop"),
+             ("[^{}]+", String),
+        ],
+        
+        # tagged [text]...[/text] delimited strings...
+        'tagstring': [
+            (r'(?s)(.*?)(\[/text\])', String, '#pop'),
+        ],
     }