Commit Graph

37 Commits

Author SHA1 Message Date
IgnacioFDM
ddf0cc69dd Compiler: Fix broken UTF8 support (#329) 2018-09-20 21:12:08 +02:00
Vincent Herbet
582df637ce
Compiler: Add __FILE__, remove __BINARY_PATH__ and rename __BINARY_NAME__ to __BINARY__ (#546)
* Compiler: Add __FILE__ and remove __BINARY_PATH__ constants

* Compiler: Rename __BINARY_NAME__ to __BINARY__
2018-09-03 21:28:28 +02:00
Arkshine
2c73268668 Fix issue where native functions returning an array would not compile 2016-02-22 23:37:09 +01:00
Arkshine
acf910b64b Fix and clean up VS projects files
+ removed unused variable :P
2015-03-10 16:20:21 +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
Arkshine
a50f104fd3 Fix trailing commas in array literals changing the result of sizeof() 2014-12-08 20:45:33 +01: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
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
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
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
b2442a2268 Compiler: Ignore #pragma tabsize with non-positive argument.
Imported from SA-MP: 7f30a03f94.
2014-08-26 09:04:50 +02:00
Arkshine
325a746d90 Compiler: Fix issue with multidimensional array variable release.
Imported from SM: https://bugs.alliedmods.net/show_bug.cgi?id=6100.
2014-08-26 09:04:39 +02:00
Arkshine
520493fab1 Compiler: Add #pragma deprecated.
This is based on SM, including patch to support macros/constants (https://hg.alliedmods.net/sourcemod-central/rev/ef8dd1cddc35).
Updated also some pawn includes to use this new pragma.
2014-08-26 09:04:36 +02:00
Asher Baker
46123d359f Add support for Emscripten to the compiler. 2014-08-15 16:32:00 +00:00
Scott Ehlert
1cff91ced5 Update license headers for compiler. 2014-08-04 13:18:28 -05:00
David Anderson
ad36859607 Port plugin building to AMBuild.
Former-commit-id: 9ac73de5b247da341b0b4cdf00ec3c7e0472be82
2014-02-08 12:42:00 -08:00
Scott Ehlert
40c1fee55a Added support for Mac OS X and building with clang (bug 5601, r=dvander). 2013-02-13 01:14:37 -06:00
David Anderson
b706108ed6 Squashed commit of the following:
commit 011d9b6b07d904ad1e81ef7c747269903e2d47c4
Author: David Anderson <dvander@alliedmods.net>
Date:   Mon Jan 11 00:17:08 2010 -0600

    Initial import from Subversion (amxmodx/trunk rev 3757).
2014-02-06 23:06:54 -08:00
Steve Dudenhoeffer
39d6cb7840 Fixed #error ignoring #if blocks 2007-02-16 18:49:21 +00:00
David Anderson
dd7529b42c Fixed a bug where three of the new pragmas parsed spaces wrong 2006-05-10 04:51:07 +00:00
David Anderson
58209dfb37 Added fix for __DATE__, added __TIME__
Added tag table crap for new autoloading feature
Version bump
2006-05-10 03:44:35 +00:00
David Anderson
9e4b1661e3 Fixed bug at21914 (faluco) 2005-11-20 19:10:13 +00:00
David Anderson
e566413224 Fixed MORE lines 2005-09-10 05:23:30 +00:00
David Anderson
368856f122 Fixed lines 2005-09-10 05:22:06 +00:00
David Anderson
52cc204787 Fixed numerous bugs in preprocessor (string literals being parsed, mismatched args being wiped) 2005-09-10 05:04:23 +00:00
David Anderson
67f012b74a Fixed bug where static declarations would crash 2005-09-06 21:34:33 +00:00
David Anderson
824caab2c5 Fixed bug p1123143748 (Twilight Suzuka) 2005-09-06 03:00:01 +00:00
David Anderson
25d629083f Initial import of Pawn (Small 3.0) 2005-07-24 20:00:55 +00:00