Adrodoc / MPL

A language to generate command blocks for Minecraft 1.9 and higher
GNU General Public License v3.0
18 stars 5 forks source link

If and While should support inserts in their conditions #61

Open Adrodoc opened 7 years ago

Adrodoc commented 7 years ago

If and While should support inserts in their conditions. For instance this program:

install {
  start main
}

String MY_CONSTANT = "this is a constant"

impulse process main {
  if: /say ${MY_CONSTANT}
  then {
    /say then
  }
}

yields the following output:

[@] ${MY_CONSTANT}
[@] then
Adrodoc commented 7 years ago

This should also be used to fix: https://github.com/Adrodoc55/MPL/blob/4c9c61d35385a11437c9c1e64861c8da926f4f08/compiler/src/main/java/de/adrodoc55/minecraft/mpl/ast/visitor/MplMainAstVisitor.java#L1010