llvmir some opt

This commit is contained in:
邓智航
2025-12-10 17:58:17 +08:00
commit 84827838e2
103 changed files with 5838 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package frontend.ast.exp;
import error.Errors;
import frontend.ast.Node;
import frontend.ast.SyntaxType;
import frontend.lexer.TokenStream;
public class ConstExp extends Node {
public ConstExp(TokenStream ts) {
super(SyntaxType.CONST_EXP, ts);
}
public void parse(Errors errors) {
AddExp ade = new AddExp(ts);
ade.parse(errors);
addChild(ade);
}
public int getValue() {
return ((AddExp) getChild(0)).getValue();
}
}