MysteryBlokHed / databind

Expand the functionality of Minecraft Datapacks.
https://databind.rtfd.io/en/stable
GNU General Public License v3.0
4 stars 0 forks source link

Add escape character #67

Closed MysteryBlokHed closed 3 years ago

MysteryBlokHed commented 3 years ago

Since the tokenizer will find any keyword no matter the context and try to tokenize it, it's impossible to use the keywords anywhere else, even in tellraw or say commands. Adding an escape character that escapes an entire keyword would help solve this problem, like this:

call func1
say ^call func1

which would become:

function namespace:func1
say call func1

If a developer wanted to use the escape character at the beginning of a word, they could just put two of them:

say ^^example

which would become:

say ^example
MysteryBlokHed commented 3 years ago

The ^ character conflicts with the character for relative coords (eg. summon minecraft:lightning ^5 ^ ^), so a different character like % could be used instead.