Arkshine
dd6ef4811c
Update compiler VS projects to reflect changes from #221
2015-03-14 12:53:43 +01:00
xPaw
8b06e5bdcd
Remove strexpand
2015-03-10 20:37:57 +02:00
xPaw
a134a75572
Remove scpack
2015-03-10 20:03:57 +02:00
Arkshine
acf910b64b
Fix and clean up VS projects files
...
+ removed unused variable :P
2015-03-10 16:20:21 +01:00
Arkshine
b0543a111d
Fix tagof operator used as a default value for function arguments
2015-01-30 23:34:04 +01:00
Vincent Herbet
5ca0e5617d
Merge pull request #173 from Arkshine/feature/compiler-concatenation
...
Add string literal concatenation and stringizing operator
2015-01-22 20:00:32 +01:00
Arkshine
97369c5d6c
Upgrade VS projetcs to use v120_xp toolset and fix missing include paths
2015-01-14 10:25:46 +01:00
Arkshine
a0cfa59e56
Compiler: Fix tautological warning with clang-3.5
2015-01-11 23:09:53 +01:00
Vincent Herbet
7f71cfaee7
Merge pull request #165 from Arkshine/feature/add-version-lib-and-missing-rc
...
Update versioning system and add missing module RC file (bug 6222)
2015-01-07 18:59:51 +01:00
Arkshine
2ffd4cb9fa
Fix with parsing literal strings ending with character '\\'
...
From Pawn rev32: https://code.google.com/p/pawnscript/source/detail?r=32
E.g.: #define EGG "Gaben^^" (control character + something)
This fixes also compilation under linux.
2015-01-07 00:35:20 +01:00
Arkshine
de2796508f
Add string literal concatenation and stringizing operator
2015-01-06 23:39:46 +01:00
Vincent Herbet
1df58d6231
Merge pull request #164 from Arkshine/fix/regression-member-tag-of-enum
...
FIx regression with member tag of enum not being checked on assigment
2014-12-13 11:23:10 +01:00
Arkshine
c068eed19d
Simplify code.
2014-12-13 11:15:06 +01:00
Arkshine
ab4294f3ca
Fix linux compilation
2014-12-10 15:41:52 +01:00
Arkshine
4b11a54345
Make sure overriden tag is done with _:
2014-12-09 22:59:57 +01:00
Arkshine
78940b46a4
Untabify code
2014-12-09 22:29:43 +01:00
Arkshine
45bf43d76e
FIx regression with member tag of an enum not being checked on assigment
2014-12-09 22:26:59 +01:00
Arkshine
5e622aa69f
Remove static on 'disable' variable
2014-12-08 23:55:30 +01:00
Arkshine
a50f104fd3
Fix trailing commas in array literals changing the result of sizeof()
2014-12-08 20:45:33 +01:00
Arkshine
1a97b2cbe1
Improve more sizeof return on array without specifiying the dimension
2014-11-11 12:34:16 +01:00
Arkshine
3b3e78d65b
Compiler: Remove commented code in previous commit
2014-09-29 20:36:14 +02:00
Arkshine
e7c7313f77
Compiler: Add a flag for warnings-as-errors
2014-09-29 15:54:39 +02:00
Arkshine
ae2699ca98
Compiler: Disable estimated memory usage
2014-09-29 15:12:56 +02:00
Arkshine
de85f2735e
Fix compiler crash due to missing recursion message warning.
2014-08-31 14:52:24 +02:00
Arkshine
f30c7a63b1
Compiler: Fix linux compilation and close file handle on success in pc_opensrc.
2014-08-26 09:06:02 +02:00
Arkshine
e46785a434
Compiler: Improve/fix recursion detection.
...
Imported from Pawn 3.2.3664 and 3.3.3875.
2014-08-26 09:05:23 +02:00
Arkshine
a873066466
Compiler: Fix enum field size was not taken into account when implicitly passed to a function.
...
Imported from Pawn 3.3.3930.
Example:
---
enum tag
{
member[32]
}
new var[tag];
foo(const string[], size = sizeof(string))
{
// size returns 1 before fix, 32, after.
}
public plugin_init()
{
foo(var[member]);
}
---
2014-08-26 09:05:22 +02:00
Arkshine
f60b00ee71
Compiler: Use hash table for global name lookups.
...
Imported from SM: https://bugs.alliedmods.net/show_bug.cgi?id=4496 .
2014-08-26 09:05:20 +02:00
Arkshine
a876962405
Compiler: Use in-memory buffers for reading files, and handle newlines better.
...
Imported from https://github.com/alliedmodders/sourcemod/pull/63 .
2014-08-26 09:05:18 +02:00
Arkshine
c2ca5d857d
Compiler: Change __line to __LINE__.
2014-08-26 09:05:17 +02:00
Arkshine
27825963f6
Compiler: Fix indentation.
2014-08-26 09:05:15 +02:00
Arkshine
ca7b0ceadd
Compiler: Revert "Add #warning directive."
...
Probably not that useful.
2014-08-26 09:05:13 +02:00
Arkshine
32b546df69
Compiler: Revert "Fix runtime error in variadic functions that return strings."
...
Better fix by dvander will be provided later.
2014-08-26 09:05:11 +02:00
Arkshine
cea2f598b2
Compiler: Fix a regression in handling multi-dimensional arrays (introduced in 744d67b)
...
Fix imported from Pawn 3.3.4058.
2014-08-26 09:05:10 +02:00
Arkshine
d44eb7bf8d
Compiler: Update VERSION_INT.
...
Some people may want to check compiler version with __Pawn, and it would be a good idea to bump the version.
Since we have a special version, and to avoid to use digit which may be used by official version, I propose using letters, so: 0x30A.
This should be resonneable.
2014-08-26 09:05:08 +02:00
Arkshine
e1445316aa
Compiler: Fix moar.
2014-08-26 09:05:07 +02:00
Arkshine
238e3707c8
Compiler: Fix linux compilation.
2014-08-26 09:05:05 +02:00
Arkshine
16e5f54507
Compiler: Improve the reported line number accuracy on warning 203/4 (symbol never used).
...
Imported from Pawn 3.1.3541+.
https://code.google.com/p/pawnscript/source/detail?r=25
2014-08-26 09:05:03 +02:00
Arkshine
65c29cafa0
Compiler: Fix #elseif handling not working as expected.
...
Improted from Pawn 3.1.3636.
-- Example
#define VAR 1
#if VAR == 1
// code
#elseif VAR == 2
// code
#endif
--
Returns error(38).
2014-08-26 09:05:01 +02:00
Arkshine
c4b233d094
Compiler: Improve sizeof return on array without specifiying the dimensions.
...
Imported from Pawn 3.1.3636.
"When making an array without specifiying the dimensions, but where the element
count at the lowest dimension is the same for all, the compiler now "counts"
this size, rather than setting the lowest dimension as "variable length".
An example for this situation is the declaration:
new my_array[][] = { {1,0}, {2,1}, {3,1} }
No dimensions are given, but the new compiler determines that the minor
dimension is 2 (and the major dimension is 3). Previous compilers set the
minor dimension to 0 --meaning "variable"."
2014-08-26 09:05:00 +02:00
Arkshine
cd189320e5
Compiler: Fix the "@" character was not allowed in macro definitions (while the documentation stated that they were).
...
Imported from Pawn 3.1.3599.
2014-08-26 09:04:58 +02:00
Arkshine
17114347d1
Compiler: Fix runtime error in variadic functions that return strings.
...
Imported from SM-AM: 1d1244c2f0
.
"This fixes a bug where returning a string from a variadic function caused
an invalid memory access error during runtime. It seems like they forgot
to update existing string return code for variadic functions."
2014-08-26 09:04:56 +02:00
Arkshine
1866afd80b
Compiler: Add __line
...
Imported from SA-MP: 605ae7f4d3
This is a backport from Pawn 4.0. It sets to the current line number during compile time.
Documention for 3.x actually mention this.
2014-08-26 09:04:55 +02:00
Arkshine
fcdeea683b
Compiler: Add #warning directive.
...
Basically same as error but as warning.
Imported from SA-MP: 1bd6be93e0
Example:
#warning don't eat egg.
Result:
warning.sma(1) : warning 234: user warning: don't eat egg.
2014-08-26 09:04:53 +02:00
Arkshine
92255bcdc3
Compiler: Fix crash when using tagof(tagname:)
...
Imported from SA-MP: 53ef10ffc7
2014-08-26 09:04:52 +02:00
Arkshine
b2442a2268
Compiler: Ignore #pragma tabsize with non-positive argument.
...
Imported from SA-MP: 7f30a03f94
.
2014-08-26 09:04:50 +02:00
Arkshine
1b3b07d4d8
Compiler: Add __BINARY_PATH__ and __BINARY_FILE__.
...
Imported from SM: https://hg.alliedmods.net/sourcemod-central/rev/bd38ac67afe1 and https://hg.alliedmods.net/sourcemod-central/rev/eb4c45360aaf .
2014-08-26 09:04:48 +02:00
Arkshine
95f3b0d354
Compiler: Fix return omission with else-after-return.
...
Imported from SM: https://bugs.alliedmods.net/show_bug.cgi?id=4852 .
2014-08-26 09:04:47 +02:00
Arkshine
9b5c6bfff0
Compiler: Fix asserting when returning a string literal.
...
Imported from SM: https://bugs.alliedmods.net/show_bug.cgi?id=3836 .
2014-08-26 09:04:45 +02:00
Arkshine
57b172072a
Compiler: Fix bogus assert about name lengths.
...
Imported from SM: https://bugs.alliedmods.net/show_bug.cgi?id=4486 .
2014-08-26 09:04:44 +02:00