diff --git a/lexers/embedded/python.xml b/lexers/embedded/python.xml index a6e889c64..3c6af86e8 100644 --- a/lexers/embedded/python.xml +++ b/lexers/embedded/python.xml @@ -206,7 +206,7 @@ - + diff --git a/lexers/testdata/python/test_structural_pattern_matching.actual b/lexers/testdata/python/test_structural_pattern_matching.actual new file mode 100644 index 000000000..451b10ad7 --- /dev/null +++ b/lexers/testdata/python/test_structural_pattern_matching.actual @@ -0,0 +1,5 @@ +var = 1 + +match var: + case 1: + print("Test") diff --git a/lexers/testdata/python/test_structural_pattern_matching.expected b/lexers/testdata/python/test_structural_pattern_matching.expected new file mode 100644 index 000000000..c8523388a --- /dev/null +++ b/lexers/testdata/python/test_structural_pattern_matching.expected @@ -0,0 +1,23 @@ +[ + {"type":"Name","value":"var"}, + {"type":"Text","value":" "}, + {"type":"Operator","value":"="}, + {"type":"Text","value":" "}, + {"type":"LiteralNumberInteger","value":"1"}, + {"type":"Text","value":"\n\n"}, + {"type":"Keyword","value":"match"}, + {"type":"Text","value":" "}, + {"type":"Name","value":"var"}, + {"type":"Punctuation","value":":"}, + {"type":"Text","value":"\n "}, + {"type":"Keyword","value":"case"}, + {"type":"Text","value":" "}, + {"type":"LiteralNumberInteger","value":"1"}, + {"type":"Punctuation","value":":"}, + {"type":"Text","value":"\n "}, + {"type":"NameBuiltin","value":"print"}, + {"type":"Punctuation","value":"("}, + {"type":"LiteralStringDouble","value":"\"Test\""}, + {"type":"Punctuation","value":")"}, + {"type":"Text","value":"\n"} +]