diff --git a/src/main/java/dk/camelot64/kickc/model/symbols/Procedure.java b/src/main/java/dk/camelot64/kickc/model/symbols/Procedure.java index 71e1b667c..ce46bb5f1 100644 --- a/src/main/java/dk/camelot64/kickc/model/symbols/Procedure.java +++ b/src/main/java/dk/camelot64/kickc/model/symbols/Procedure.java @@ -34,7 +34,7 @@ public class Procedure extends Scope { /** Reserved zeropage addresses. */ private List reservedZps; /** The code segment to put the procedure into. */ - private final String codeSegment; + private String codeSegment; /** The list of constructor procedures for this procedure. The constructor procedures are called during program initialization. */ private final List constructorRefs; /** Is this procedure declared as a constructor procedure. */ @@ -117,6 +117,10 @@ public class Procedure extends Scope { return codeSegment; } + public void setCodeSegment(String codeSegment) { + this.codeSegment = codeSegment; + } + public List getParameterNames() { return parameterNames; } diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java b/src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java index 50a51154a..e7a343ac6 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java @@ -548,6 +548,7 @@ public class Pass0GenerateStatementSequence extends KickCParserBaseVisitor