mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-09-08 17:54:40 +00:00
Fixed NPE
This commit is contained in:
parent
471117561b
commit
cd2c50b8a8
@ -188,9 +188,11 @@ public class Pass1GenerateStatementSequence extends KickCBaseVisitor<Object> {
|
|||||||
this.visit(stmtForCtx.stmt());
|
this.visit(stmtForCtx.stmt());
|
||||||
}
|
}
|
||||||
// Add increment
|
// Add increment
|
||||||
|
if(ctx.expr(1)!=null) {
|
||||||
PrePostModifierHandler.addPreModifiers(this, ctx.expr(1));
|
PrePostModifierHandler.addPreModifiers(this, ctx.expr(1));
|
||||||
this.visit(ctx.expr(1));
|
this.visit(ctx.expr(1));
|
||||||
PrePostModifierHandler.addPostModifiers(this, ctx.expr(1));
|
PrePostModifierHandler.addPostModifiers(this, ctx.expr(1));
|
||||||
|
}
|
||||||
// Add condition
|
// Add condition
|
||||||
PrePostModifierHandler.addPreModifiers(this, ctx.expr(0));
|
PrePostModifierHandler.addPreModifiers(this, ctx.expr(0));
|
||||||
RValue rValue = (RValue) this.visit(ctx.expr(0));
|
RValue rValue = (RValue) this.visit(ctx.expr(0));
|
||||||
|
Loading…
Reference in New Issue
Block a user