Operations nodes and variadic tests

This commit is contained in:
barsdeveloper
2023-05-20 00:09:29 +02:00
parent 7f57786d55
commit 487cf221d1
9 changed files with 436 additions and 46 deletions

View File

@@ -675,14 +675,41 @@ export default class ObjectEntity extends IEntity {
switch (memberParent) {
case Configuration.paths.slateBlueprintLibrary:
case Configuration.paths.kismetMathLibrary:
if (memberName.startsWith("And_")) {
return "&"
}
if (memberName.startsWith("Conv_")) {
return "" // Conversion nodes do not have visible names
}
if (memberName.startsWith("EqualEqual_")) {
return "=="
}
if (memberName.startsWith("Greater_")) {
return ">"
}
if (memberName.startsWith("GreaterEqual_")) {
return ">="
}
if (memberName.startsWith("Less_")) {
return "<"
}
if (memberName.startsWith("LessEqual_")) {
return "<="
}
if (memberName.startsWith("Not_")) {
return "~"
}
if (memberName.startsWith("NotEqual_")) {
return "!="
}
if (memberName.startsWith("Or_")) {
return "|"
}
if (memberName.startsWith("Percent_")) {
return "%"
}
if (memberName.startsWith("EqualEqual_")) {
return "=="
if (memberName.startsWith("Xor_")) {
return "^"
}
const leadingLetter = memberName.match(/[BF]([A-Z]\w+)/)
if (leadingLetter) {
@@ -691,12 +718,16 @@ export default class ObjectEntity extends IEntity {
}
switch (memberName) {
case "Abs": return "ABS"
case "BooleanAND": return "AND"
case "BooleanNAND": return "NAND"
case "BooleanOR": return "OR"
case "Exp": return "e"
case "LineTraceSingle": return "Line Trace By Channel"
case "Max": return "MAX"
case "MaxInt64": return "MAX"
case "Min": return "MIN"
case "MinInt64": return "MIN"
case "Not_PreBool": return "NOT"
case "Sqrt": return "SQRT"
case "Square": return "^2"
}
@@ -855,8 +886,13 @@ export default class ObjectEntity extends IEntity {
switch (this.getType()) {
case Configuration.paths.commutativeAssociativeBinaryOperator:
switch (this.FunctionReference?.MemberName) {
case "And_Int64Int64":
case "And_IntInt":
case "BMax":
case "BMin":
case "BooleanAND":
case "BooleanNAND":
case "BooleanOR":
case "Concat_StrStr":
case "FMax":
case "FMin":
@@ -864,6 +900,8 @@ export default class ObjectEntity extends IEntity {
case "MaxInt64":
case "Min":
case "MinInt64":
case "Or_Int64Int64":
case "Or_IntInt":
pinEntities ??= () => this.getPinEntities().filter(pinEntity => pinEntity.isInput())
pinIndexFromEntity ??= pinEntity =>
pinEntity.PinName.match(/^\s*([A-Z])\s*$/)?.[1]?.charCodeAt(0) - "A".charCodeAt(0)