Closed vuryleo closed 11 years ago
Thank you, this bug has been fixed.
a: int
a: unsigned int
a: bool
a: char
a: signed char
a: unsigned char
a: short
a: unsigned short
a: long
a: unsigned long
a: long int
a: long long
a: long long long
a: long long int
a: unsigned long long
a: float
a: double
a: long double
Can't use type long long
as the function return type now.
For example
long long getE()
return 0
Compiler gives
Compile Error:
line 1:16 mismatched input ')' expecting set
line 2:5 mismatched input 'NEWLINE' expecting '('
line 2:5 missing EndOfFile at 'INDENT'
I decided to use go style int64 to distinguish different kind of integer types.
import "cstdint"
a: bool
b: char
c: uchar
d: int
e: uint
f: int8
g: int16
h: uint16
i: int32
j: uint32
k: int64
l: uint64
m: float
n: double
o: long double
int main()
a = true
Translate into
#include "cstdint"
bool a;
char b;
unsigned char c;
int d;
unsigned int e;
int8_t f;
int16_t g;
uint16_t h;
int32_t i;
uint32_t j;
int64_t k;
uint64_t l;
float m;
double n;
long double o;
int main() {
a = true;
}
When testing with
It gives
`` cpp
Compile Error: line 5:10 no viable alternative at input 'long'