3.10.8
- Fix multi-line strings getting extra spaces from leading spaces with continuations. This:
new str[] = "Hello \
there";
Again gives:
Hello there
Instead of
Hello there
- Reverted allowing continuations in single-line comments. This will (again) give an error:
// I'm a comment\
and so was I.
- Added one exception to the above rule. No error will be given if the following line is also commented:
// I'm a comment\
// and so am I
This makes it easy to comment out code that uses line-continuations (such as defines).
- Added more information to tag mismatch warnings:
native printf(str[], {Float, _}:...);
main()
{
new File:a;
printf("%d", a);
}
Gives:
warning 213: tag mismatch: expected tags "Float", or none ("_"); but found "File"
- Proper (fixed) continuation handling in pre-processor messages:
#pragma deprecated Please\
use\
something\
else
Func() {}
main()
{
Func();
}
Gives:
warning 234: function is deprecated (symbol "Func") Please use something else
Note that unlike in strings (which retain their old behaviour for backwards-compatibility reasons) the \
is replaced by a space.
- Fix continuations in defines. This no longer declares a macro called
MACRO5
, but a macro calledMACRO
with a value of5
.
#define MACRO\
5