MPL icon indicating copy to clipboard operation
MPL copied to clipboard

If and While should support inserts in their conditions

Open Adrodoc opened this issue 7 years ago • 1 comments

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 avatar Mar 06 '17 18:03 Adrodoc

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

Adrodoc avatar Mar 06 '17 18:03 Adrodoc