diff --git a/languages.json b/languages.json index 2e0f2e162..34a7274b4 100644 --- a/languages.json +++ b/languages.json @@ -1088,6 +1088,10 @@ "Max": { "extensions": ["maxpat"] }, + "Mcfunction": { + "line_comment": ["#"], + "extensions": ["mcfunction"] + }, "Mdx": { "name": "MDX", "literate": true, diff --git a/tests/data/mcfunction.mcfunction b/tests/data/mcfunction.mcfunction new file mode 100644 index 000000000..2285b1226 --- /dev/null +++ b/tests/data/mcfunction.mcfunction @@ -0,0 +1,10 @@ +# 10 lines 4 code 2 comments 4 blanks + +gamerule commandBlockOutput false + +execute as @a run say Hello world! +# Single line comment + +summon cow ~ ~ ~ {CustomName:'{"text":"Definitely not a cow"}'} + +execute if score @s my_objective matches 1..10 run say my_objective is between 1 and 10 (inclusive) \ No newline at end of file