diff options
Diffstat (limited to 'tests/snippets/python/test_walrus_operator.txt')
-rw-r--r-- | tests/snippets/python/test_walrus_operator.txt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/snippets/python/test_walrus_operator.txt b/tests/snippets/python/test_walrus_operator.txt new file mode 100644 index 0000000..9bab89d --- /dev/null +++ b/tests/snippets/python/test_walrus_operator.txt @@ -0,0 +1,21 @@ +# Tests that ':=' is recognized as an Operator + +---input--- +if (a := 2) > 4: + +---tokens--- +'if' Keyword +' ' Text +'(' Punctuation +'a' Name +' ' Text +':=' Operator +' ' Text +'2' Literal.Number.Integer +')' Punctuation +' ' Text +'>' Operator +' ' Text +'4' Literal.Number.Integer +':' Punctuation +'\n' Text.Whitespace |