MCPcopy Create free account
hub / github.com/acsoto/BUAA-Compiler / toString

Method toString

src/CodeGeneration/PCode.java:39–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37 }
38
39 @Override
40 public String toString() {
41 if (type.equals(CodeType.LABEL)) {
42 return value1.toString() + ": ";
43 }
44 if (type.equals(CodeType.FUNC)) {
45 return "FUNC @" + value1.toString() + ":";
46 }
47 if (type.equals(CodeType.CALL)) {
48 return "$" + value1.toString();
49 }
50 if (type.equals(CodeType.PRINT)) {
51 return type + " " + value1;
52 }
53 String a = value1 != null ? value1.toString() : "";
54 String b = value2 != null ? ", " + value2.toString() : "";
55 return type + " " + a + b;
56 }
57}

Callers 1

runMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected