change all expression and statement pointers to be const (#449)

* change all expression and statement pointers to be const

* const in paren tests
This commit is contained in:
Jeremy G. Siek
2021-04-19 21:47:19 -04:00
committed by GitHub
parent 153d92b390
commit 34f1a03f7b
21 changed files with 258 additions and 229 deletions
+3 -3
View File
@@ -59,7 +59,7 @@ void PrintActList(Stack<Action*> ls, std::ostream& out) {
}
}
auto MakeExpAct(Expression* e) -> Action* {
auto MakeExpAct(const Expression* e) -> Action* {
auto* act = new Action();
act->tag = ActionKind::ExpressionAction;
act->u.exp = e;
@@ -67,7 +67,7 @@ auto MakeExpAct(Expression* e) -> Action* {
return act;
}
auto MakeLvalAct(Expression* e) -> Action* {
auto MakeLvalAct(const Expression* e) -> Action* {
auto* act = new Action();
act->tag = ActionKind::LValAction;
act->u.exp = e;
@@ -75,7 +75,7 @@ auto MakeLvalAct(Expression* e) -> Action* {
return act;
}
auto MakeStmtAct(Statement* s) -> Action* {
auto MakeStmtAct(const Statement* s) -> Action* {
auto* act = new Action();
act->tag = ActionKind::StatementAction;
act->u.stmt = s;