mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-06-03 07:29:37 +00:00
Added missing operators
This commit is contained in:
parent
1ab03df908
commit
9652931592
|
@ -26,8 +26,9 @@ expr
|
|||
| expr ( 'plus' | 'minus' ) expr #binary
|
||||
| 'neg' expr #unary
|
||||
| 'bnot' expr #unary
|
||||
| 'addr' expr #unary
|
||||
| ( 'inc' | 'dec' ) expr #unary
|
||||
| ( 'byte' | 'sbyte' | 'word' | 'sword' | 'dword' | 'sdword' ) expr #unary
|
||||
| ( 'byte' | 'sbyte' | 'word' | 'sword' | 'dword' | 'sdword' | 'ptr' ) expr #unary
|
||||
| ( 'byte0' | 'byte1' | 'byte2' | 'byte3' | 'word0' | 'word1') expr #unary
|
||||
| expr ( 'setbyte0' | 'setbyte1' | 'setbyte2' | 'setbyte3' | 'setword0' | 'setword1' ) expr #binary
|
||||
| expr 'memcpy' expr #memcpy
|
||||
|
|
|
@ -234,7 +234,7 @@ public class Operators {
|
|||
return WORD0;
|
||||
case "word1":
|
||||
return WORD1;
|
||||
case "ptr":
|
||||
case "addr":
|
||||
return ADDRESS_OF;
|
||||
case "byte":
|
||||
return getCastUnary(SymbolType.BYTE);
|
||||
|
@ -248,6 +248,8 @@ public class Operators {
|
|||
return getCastUnary(SymbolType.DWORD);
|
||||
case "sdword":
|
||||
return getCastUnary(SymbolType.SDWORD);
|
||||
case "ptr":
|
||||
return getCastUnary(new SymbolTypePointer(SymbolType.VOID));
|
||||
default:
|
||||
throw new RuntimeException("Unknown operator " + op);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user