kopia lustrzana https://github.com/maccasoft/z80-tools
Fixed section handling
rodzic
51f8b2b340
commit
4762bcc745
|
@ -17,6 +17,7 @@ import nl.grauw.glass.Line;
|
|||
import nl.grauw.glass.Scope;
|
||||
import nl.grauw.glass.Source;
|
||||
import nl.grauw.glass.directives.If;
|
||||
import nl.grauw.glass.directives.Section;
|
||||
|
||||
public class BinaryBuilder {
|
||||
|
||||
|
@ -90,6 +91,16 @@ public class BinaryBuilder {
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (line.getDirective() instanceof Section) {
|
||||
if (line.getInstructionObject() != null) {
|
||||
nl.grauw.glass.instructions.Section ins = (nl.grauw.glass.instructions.Section) line.getInstruction();
|
||||
build(ins.getSource());
|
||||
}
|
||||
else {
|
||||
Section ins = (Section) line.getDirective();
|
||||
build(ins.getSource());
|
||||
}
|
||||
}
|
||||
} catch (AssemblyException e) {
|
||||
e.addContext(line);
|
||||
throw e;
|
||||
|
|
|
@ -17,6 +17,7 @@ import nl.grauw.glass.Line;
|
|||
import nl.grauw.glass.Scope;
|
||||
import nl.grauw.glass.Source;
|
||||
import nl.grauw.glass.directives.If;
|
||||
import nl.grauw.glass.directives.Section;
|
||||
|
||||
public class IntelHexBuilder {
|
||||
|
||||
|
@ -97,6 +98,16 @@ public class IntelHexBuilder {
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (line.getDirective() instanceof Section) {
|
||||
if (line.getInstructionObject() != null) {
|
||||
nl.grauw.glass.instructions.Section ins = (nl.grauw.glass.instructions.Section) line.getInstruction();
|
||||
build(ins.getSource());
|
||||
}
|
||||
else {
|
||||
Section ins = (Section) line.getDirective();
|
||||
build(ins.getSource());
|
||||
}
|
||||
}
|
||||
} catch (AssemblyException e) {
|
||||
e.addContext(line);
|
||||
throw e;
|
||||
|
|
|
@ -15,6 +15,7 @@ import nl.grauw.glass.Line;
|
|||
import nl.grauw.glass.Scope;
|
||||
import nl.grauw.glass.Source;
|
||||
import nl.grauw.glass.directives.If;
|
||||
import nl.grauw.glass.directives.Section;
|
||||
|
||||
public class ListingBuilder {
|
||||
|
||||
|
@ -108,6 +109,16 @@ public class ListingBuilder {
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (line.getDirective() instanceof Section) {
|
||||
if (line.getInstructionObject() != null) {
|
||||
nl.grauw.glass.instructions.Section ins = (nl.grauw.glass.instructions.Section) line.getInstruction();
|
||||
build(ins.getSource());
|
||||
}
|
||||
else {
|
||||
Section ins = (Section) line.getDirective();
|
||||
build(ins.getSource());
|
||||
}
|
||||
}
|
||||
} catch (AssemblyException e) {
|
||||
e.addContext(line);
|
||||
throw e;
|
||||
|
|
|
@ -21,4 +21,8 @@ public class Section extends Directive {
|
|||
super.register(scope, line);
|
||||
}
|
||||
|
||||
public Source getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue