Commits

Andy Li  committed 2a6be98

haxe3 pattern matching.

  • Participants
  • Parent commits 53f205a
  • Branches Haxe-rewrite

Comments (0)

Files changed (2)

File pygments/lexers/web.py

         
         'switch': [
             include('spaces'),
-            (r'\(', Text, ('#pop', 'switch-body', 'bracket-open', 'expr')),
+            (r'', Text, ('#pop', 'switch-body', 'bracket-open', 'expr')),
         ],
         
         'switch-body': [
         
         'case-guard': [
             include('spaces'),
-            (r'(?:if)\b', Keyword, ('#pop', 'parenthesis')),
+            (r'(?:if)\b', Keyword, ('#pop', 'parenthesis', 'parenthesis-open')),
             (r'', Text, '#pop'),
         ],
         

File tests/examplefiles/example.hx

 		"5";
 }
 
+switch [true, 1, "foo"] {
+	case [true, 1, "foo"]: "0";
+	case [true, 1, _]: "1";
+	case _: "_";
+}
+
 
 class Test <T:Void->Void> {
 	private function new():Void {