Stevertus / mcscript

A programming language for Minecraft Vanilla
https://mcscript.stevertus.com
MIT License
233 stars 16 forks source link

Cannot put comments inside blocks #38

Open Nixinova opened 3 years ago

Nixinova commented 3 years ago

The following creates invalid output:

if ('score X Y matches 1') {
 # Comment
 say hi
}

The output is:

execute if score X Y matches 1 run # Comment
execute if score X Y matches 1 run say hi

Slash comments (//) must be used instead.

What should happen is that the hash comment is just placed before the following command, like:

# Comment
execute if score X Y matches 1 run say hi