VVWVV
49f88fb49b
fix incorrect comment
2017-10-28 03:20:12 +03:00
VVWVV
0786aed158
fix tokenisation operator in strings
2017-10-28 03:18:24 +03:00
Zeex
735291fd64
Merge branch 'performance'
2017-10-28 05:18:36 +06:00
Zeex
4a5e02ef29
Clean up global declarations
2017-10-28 05:05:37 +06:00
Y_Less
0e05780e8a
Merge branch 'master' of github.com:Zeex/pawn
2017-10-26 17:08:11 +02:00
Y_Less
b7692fda79
#pragma option
2017-10-26 11:41:33 +02:00
Zeex
693591bdc3
Don't delete trailing whitespace before '\'
...
new s [] = "hello \
world";
^ needs to be "hello world", not "helloworld".
2017-10-26 04:36:19 +06:00
VVWVV
a65f757a2c
add tokenisation operator
2017-10-24 18:43:43 +03:00
Daniel_Cortez
aa9f589bf5
Memoize the address of the '__line' symbol instead of searching for it in loctab/glbtab every new line
2017-10-20 23:02:34 +07:00
Daniel_Cortez
dc21aec45d
Set cache_sym->next to NULL in symbol_cache_remove()
2017-10-19 21:08:20 +02:00
Daniel_Cortez
03aaa4f2cd
Minor adjustments
2017-10-19 21:08:20 +02:00
Daniel_Cortez
f5ba1b4077
Improved itoh() implementation
2017-10-19 21:08:20 +02:00
Daniel_Cortez
8665f8b03c
Code cleanup, style fixes
2017-10-19 21:08:20 +02:00
Alex Martin
b312efa57b
bug-fix: append new symbol to last one
2017-10-19 21:08:20 +02:00
Alex Martin
3c5f91dd0b
fix symbol lookup for symbols with same name
2017-10-19 21:08:20 +02:00
Alex Martin
73d4934d61
store symbol children for faster lookup
2017-10-19 21:08:20 +02:00
Alex Martin
2d8791a0f2
minor improvement
2017-10-19 21:08:20 +02:00
Alex Martin
0138726698
add symbol lookup cache
2017-10-19 21:08:20 +02:00
Zeex
e7ecf386f8
Remove temporary '\a' characters and trailing whitespace in line continuations
2017-10-08 02:31:34 +06:00
Zeex
a0c994493d
Merge pull request #192 from YashasSamaga/i187-fix
...
remove extra new lines from #warning and #pragma deprecated
2017-10-07 23:04:40 +06:00
Daniel_Cortez
6119df8f2b
Rename asm
to emit
, add __emit
as an alternate keyword.
2017-10-06 15:51:24 +07:00
Yashas
13314369a5
handle allocation failure in the previous commit
2017-09-30 09:33:47 +05:30
Yashas
bd133697fd
remove extra new lines from #warning and #pragma deprecated
...
The `#warning` and `#pragma deprecated` directives print the new line characters which are part of the user entered string. As the message formats for both these already contain a new line character at the end, the aforementioned directives printed two new lines.
This commit adds code to discard the new line characters from user string.
2017-09-30 09:24:23 +05:30
VVWVV
fc9e3f785d
Merge branch 'master' into feature_asm_expr
2017-08-01 22:36:34 +03:00
VVWVV
223838de79
Merge branch 'master' into fix_emit_crash
2017-07-29 22:21:31 +03:00
VVWVV
e0d5c1dc6a
Update fix
...
Signed-off-by: VVWVV <d0u61ev@gmail.com>
2017-07-29 22:12:58 +03:00
VVWVV
e19354a52c
Add new asm operator instead of #emit
...
Signed-off-by: VVWVV <d0u61ev@gmail.com>
2017-07-29 22:02:26 +03:00
VVWVV
284bbc1a12
Remove a variable for reference counting in emit
...
Signed-off-by: VVWVV <d0u61ev@gmail.com>
2017-03-12 10:33:59 +03:00
VVWVV
ba64ad437e
Update the fix
2017-03-12 10:28:28 +03:00
VVWVV
6124e5e662
Add comments
...
Signed-off-by: VVWVV <d0u61ev@gmail.com>
2017-03-10 03:33:24 +03:00
Zeex
687d1ff017
Remove extra newlines from assembly listings
...
Those new lines were added in commit 6b2119f9. This is basically
an improved version of that fix.
Fixes #149 .
2017-02-12 20:49:08 +06:00
Zeex
3a4878f54b
Fix clang warnings
2017-02-11 19:32:10 +06:00
Zeex
8d6f051db4
Add __file, __date, __time constants
...
Closes #105 , fixes #144 .
2017-02-04 13:05:02 +06:00
Zeex
0cd10a73d6
Revert "Add built-in __file constant"
...
This reverts commit d15fc2224be20eac391062d1c1898b027a168713.
2017-02-03 00:45:21 +06:00
Zeex
d15fc2224b
Add built-in __file constant
...
__file will be always set to the name of the currently processed input file.
It's similar to the __FILE__ macro in C.
See #105 , #140 .
2017-01-29 22:09:07 +06:00
VVWVV
5ee186223f
Fix the compiler crash with #emit
...
Signed-off-by: VVWVV <d0u61ev@gmail.com>
2017-01-27 18:30:01 +03:00
VVWVV
a1de225a7a
Fix typo in comment
...
Signed-off-by: VVWVV <d0u61ev@gmail.com>
2017-01-21 21:42:07 +03:00
VVWVV
b75c633ad7
Add support for float negative values to #emit
...
Signed-off-by: VVWVV <d0u61ev@gmail.com>
2017-01-21 21:21:32 +03:00
Zeex
9d8c1c55c5
Minor style fixes
2017-01-17 23:32:18 +06:00
Yashas
b13928c584
moved a declaration to the start of block
...
Abiding by the C89 declaration rules so that AppVeyor build can succeed.
2017-01-14 20:10:56 +05:30
Yashas
3234a29eb1
allow negative numbers in #emit
2016-12-26 17:40:36 +05:30
Zeex
036fd4f4c8
Don't set uWRITTEN flag for functions referenced from #emit
...
uWRITTEN == uRETVALUE, so marking a function symbol as written causes a
false "should return a value" warning.
Fixes #97
2016-07-02 11:04:05 +06:00
Zeex
6b2119f974
Always insert a newline at the end of file
...
Fixes #104
2016-07-02 10:29:16 +06:00
Zeex
3594c6170d
Fix previous fix
2015-04-26 02:06:06 +06:00
Zeex
85f849ba08
Fix symbol nesting level not remembered for 2d+ arrays
...
This fixes a bug where defining a 2d+ array variable in different
blocks at the same nesting level would trigger a symbol redefinition
error. For example:
main() {
new x;
if (x) {
new a[10][11];
} else {
new a[10][12]; // error 021: symbol already defined: "a"
}
}
It turned out that the compiler defines a separate symbol for each
of the array dimensions but it only was setting sym->compound for the
first of them, causing delete_symbols() to not delete the remaining
dimension symbols. Now it sets the compound field for all dimensions.
Fixes #60
2015-04-25 15:49:10 +06:00
Zeex
c0cb31de01
Fix unreferenced local variable warning
2015-04-07 14:25:16 +06:00
Zeex
2df5c68af1
Fix memory leak in previous commit
2015-04-07 13:36:00 +06:00
Zeex
8b9af3a2e2
Fix incomplete '\' support in compat mode
...
See d0f3a9a8df (commitcomment-10583578)
2015-04-07 05:25:47 +06:00
Zeex
6b3c30aa9e
Add new built-in constant __compat
...
The __compat constant is set to 0 when compatibility mode is disabled
and 1 (or some non-zero value) if enabled, either by using -Z or with
`#pragma compat`.
2015-04-06 18:08:27 +06:00
Zeex
2214988c05
Fix redefinition of S_ISDIR() on MinGW
2015-04-06 16:55:20 +06:00