diff options
author | Georg Brandl <georg@python.org> | 2021-06-20 10:52:45 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2021-06-20 10:52:48 +0200 |
commit | 1664557be85cb45d38cc419500717ffde9392016 (patch) | |
tree | 8858d11bf7ee63cc13a0229fab1175e5bd49bff1 /tests | |
parent | faf69c028f0efa7798a938163e8432d838acfda2 (diff) | |
download | pygments-git-1664557be85cb45d38cc419500717ffde9392016.tar.gz |
Rust: fix lexing of "break" and "continue"
fixes #1843
Diffstat (limited to 'tests')
-rw-r--r-- | tests/snippets/rust/test_break.txt | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/snippets/rust/test_break.txt b/tests/snippets/rust/test_break.txt new file mode 100644 index 00000000..7dafde2d --- /dev/null +++ b/tests/snippets/rust/test_break.txt @@ -0,0 +1,39 @@ +---input--- +loop { + break; + break 'foo; + break'foo; + break_it; +} + +---tokens--- +'loop' Keyword +' ' Text.Whitespace +'{' Punctuation +'\n' Text.Whitespace + +' ' Text.Whitespace +'break' Keyword +';' Punctuation +'\n' Text.Whitespace + +' ' Text.Whitespace +'break' Keyword +' ' Text.Whitespace +"'foo" Name.Label +';' Punctuation +'\n' Text.Whitespace + +' ' Text.Whitespace +'break' Keyword +"'foo" Name.Label +';' Punctuation +'\n' Text.Whitespace + +' ' Text.Whitespace +'break_it' Name +';' Punctuation +'\n' Text.Whitespace + +'}' Punctuation +'\n' Text.Whitespace |