Fixed #4642 / Logic op reorganization

This commit is contained in:
Anuken
2021-02-09 09:34:58 -05:00
parent 38843c25fb
commit a99151441c
6 changed files with 48 additions and 19 deletions

View File

@@ -13,6 +13,11 @@ public class LAssembler{
public static ObjectMap<String, Func<String[], LStatement>> customParsers = new ObjectMap<>();
public static final int maxTokenLength = 36;
private static final StringMap opNameChanges = StringMap.of(
"atan2", "angle",
"dst", "len"
);
private int lastVar;
/** Maps names to variable IDs. */
public ObjectMap<String, BVar> vars = new ObjectMap<>();
@@ -127,6 +132,11 @@ public class LAssembler{
}
}
//fix up changed operaiton names
if(type.equals("op")){
arr[1] = opNameChanges.get(arr[1], arr[1]);
}
LStatement st = LogicIO.read(arr);
if(st != null){