104 Commits

Author SHA1 Message Date
Zeex
0c8f23453e Fix compile error with string literals in ternary operator
The ':' symbol was not recognized as a separator in stringize mode
so you always got a weird compile error with a code like this:

(condition) ? "yes : "no"

error 001: expected token: "-string end-", but found "-identifier-"

See 2) here: http://forum.sa-mp.com/showthread.php?t=355877

Test code:

native print(const s[]);

main() {
	new a = 5;
	print((a == 5) ? "is five" : !"is not five");
	print((a != 5) ? !"is not five" : "is five");
}
2014-01-01 03:49:30 +07:00
Zeex
4831cb76a3 Different fix for arrays of unpacked strings
Do it the same way as it's done for packed strings, for consistency.
2013-12-31 01:38:45 +07:00
Zeex
d9999d4da8 Fix compile error with arrays of packed strings
This fixes the "possibly non-terminated string" error when declaring an
array of packed strings (unpacked strings worked OK).

Test code:

new x[][] = {
	!"hello",
	!"world"
};

main() {
	printf("%s", x[0]);
}
2013-12-27 02:41:37 +07:00
Zeex
766b96bcf3 Lower case directory names 2013-09-19 13:06:46 +07:00