summaryrefslogtreecommitdiff
path: root/tests/snippets/mcfunction/difficult_1.txt
diff options
context:
space:
mode:
authorRit <RitikShah@users.noreply.github.com>2022-04-24 05:59:41 -0700
committerGitHub <noreply@github.com>2022-04-24 14:59:41 +0200
commit8ad1bea2a285b33778aa38eb274ddea9a6afc0b9 (patch)
tree66a52e90346a88ade27f6ab59a8c556f9aa794b9 /tests/snippets/mcfunction/difficult_1.txt
parent323a7056a7df342e2e4e9986204f5d80487fae56 (diff)
downloadpygments-git-8ad1bea2a285b33778aa38eb274ddea9a6afc0b9.tar.gz
Initial commit for MCFunction Lexer + tests (#2107)
* Initial commit for MCFunction Lexer + tests * Apply suggestions from code review Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr> * added docstring info + fix for run ... command * remove string ending Error tokens * not working - refactor in-progress * fixed: generic property * Update pygments/lexers/mcfunction.py Co-authored-by: Georg Brandl <georg@python.org> * apply some fixes from comments * Update pygments/lexers/mcfunction.py Co-authored-by: Georg Brandl <georg@python.org> * spacing * updated tests and applied more suggestions * fixed comment regex, passes tests Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr> Co-authored-by: Georg Brandl <georg@python.org>
Diffstat (limited to 'tests/snippets/mcfunction/difficult_1.txt')
-rw-r--r--tests/snippets/mcfunction/difficult_1.txt56
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/snippets/mcfunction/difficult_1.txt b/tests/snippets/mcfunction/difficult_1.txt
new file mode 100644
index 00000000..f9ad1bcf
--- /dev/null
+++ b/tests/snippets/mcfunction/difficult_1.txt
@@ -0,0 +1,56 @@
+---input---
+# execute as @e[nbt={ Item: {id: "minecraft:diamond", Count: 64 } }] run
+# setblock ~ ~ ~ minecraft:dispenser[facing=up]{Items: [{id: "minecraft:diamond", Count: 1}]}
+# tellraw @a [{"text": "hello", "color": "blue"}, {"text": "world", "color": "blue"}]
+
+execute as @a[advancements={minecraft:story/form_obsidian={foo=true, bar=false},minecraft:story/follow_ender_eye={foo=false, bar=true}}] run
+
+---tokens---
+'# execute as @e[nbt={ Item: {id: "minecraft:diamond", Count: 64 } }] run' Comment.Single
+'\n' Text.Whitespace
+
+'# setblock ~ ~ ~ minecraft:dispenser[facing=up]{Items: [{id: "minecraft:diamond", Count: 1}]}' Comment.Single
+'\n' Text.Whitespace
+
+'# tellraw @a [{"text": "hello", "color": "blue"}, {"text": "world", "color": "blue"}]' Comment.Single
+'\n\n' Text.Whitespace
+
+'execute' Name.Builtin
+' ' Text.Whitespace
+'as' Keyword.Constant
+' ' Text.Whitespace
+'@a' Name.Variable
+'[' Punctuation
+'advancements' Name.Attribute
+'=' Punctuation
+'{' Punctuation
+'minecraft:story/form_obsidian' Name.Attribute
+'=' Punctuation
+'{' Punctuation
+'foo' Name.Attribute
+'=' Punctuation
+'true' Name.Tag
+',' Punctuation
+' ' Text.Whitespace
+'bar' Name.Attribute
+'=' Punctuation
+'false' Name.Tag
+'}' Punctuation
+',' Punctuation
+'minecraft:story/follow_ender_eye' Name.Attribute
+'=' Punctuation
+'{' Punctuation
+'foo' Name.Attribute
+'=' Punctuation
+'false' Name.Tag
+',' Punctuation
+' ' Text.Whitespace
+'bar' Name.Attribute
+'=' Punctuation
+'true' Name.Tag
+'}' Punctuation
+'}' Punctuation
+']' Punctuation
+' ' Text.Whitespace
+'run' Keyword.Constant
+'\n' Text.Whitespace