mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-12-19 15:29:48 +00:00
Fixed bresenham array again
This commit is contained in:
parent
0bdd9d2f2e
commit
0f3da0ea3e
@ -0,0 +1,9 @@
|
||||
lda #<{cowo1}
|
||||
clc
|
||||
adc {zpwo1}
|
||||
sta !s+ +1
|
||||
lda #>{cowo1}
|
||||
adc {zpwo1}+1
|
||||
sta !s+ +2
|
||||
lda #{coby2}
|
||||
!s: sta {cowo1}
|
@ -88,6 +88,11 @@ public class PassTypeInference {
|
||||
if(type1==null && type2 instanceof SymbolTypePointer) {
|
||||
return ((SymbolTypePointer) type2).getElementType();
|
||||
}
|
||||
if (SymbolTypeBasic.WORD.equals(type1) || SymbolTypeBasic.WORD.equals(type2)) {
|
||||
return SymbolTypeBasic.WORD;
|
||||
} else if (SymbolTypeBasic.BYTE.equals(type1) && SymbolTypeBasic.BYTE.equals(type2)) {
|
||||
return SymbolTypeBasic.BYTE;
|
||||
}
|
||||
throw new RuntimeException("Type inference case not handled " + type1 + " " + operator + " " + type2);
|
||||
case "/":
|
||||
if (SymbolTypeBasic.WORD.equals(type1) || SymbolTypeBasic.WORD.equals(type2)) {
|
||||
|
@ -13,7 +13,7 @@ import java.util.List;
|
||||
/** Test my KickC Grammar */
|
||||
public class Main {
|
||||
public static void main(String[] args) throws IOException {
|
||||
final String fileName = "src/dk/camelot64/kickc/test/sprtabs.kc";
|
||||
final String fileName = "src/dk/camelot64/kickc/test/bresenhamarr.kc";
|
||||
final CharStream input = CharStreams.fromFileName(fileName);
|
||||
System.out.println(input.toString());
|
||||
KickCLexer lexer = new KickCLexer(input);
|
||||
|
Loading…
Reference in New Issue
Block a user