phobos2077
4ea7af04ad
Renamed variables "true" and "false" to fix compilation in newer GCC
2025-06-12 14:34:20 +02:00
phobos2077
e83a58d34f
Variable initialization: fix failure to recognize expressions that only start with constant
2024-06-11 00:29:32 +02:00
phobos2077
d15a8cc310
ForEach: fix crash in foreach variable v in ar
2024-06-11 00:26:33 +02:00
phobos2077
fb2343792c
Parser.dll: fix Sfall Script Editor compatibility
2024-06-10 10:19:44 +02:00
phobos2077
13390e3f7c
ForEach: more robust check for removal of temp array var
...
- Handles cases like `foreach (x in arr[1])`, which required parentheses before.
- Generated code should not be affected.
2024-06-10 10:13:51 +02:00
phobos2077
f9d59f7e83
ForEach: skip temp var for array when it's a fetch from global or external var
2024-06-09 17:41:16 +02:00
phobos2077
3bf82984f3
Syntax improvements: foreach, for, variables
...
- ForEach: allow to declare variables for key & value header
- ForEach: allow to use expression after `in` that start with a symbol without mandatory parantheses
- Variables: allow to declare variables anywhere where statement is expected
- Variables: simplify declaration code & array vars
- Expressions: display useful error message when expression was expected but nothing was parsed
2024-06-09 17:26:09 +02:00
phobos2077
500cd103b2
Stringspace compression: Fix procedure stringified names shifting on every use when
2024-06-09 12:01:31 +02:00
phobos2077
7868584724
Fix conditional args not working for extern procs
...
- Fix crash when compiling script with procedure that has no body
2023-07-11 22:25:00 +02:00
phobos2077
cffdfba1b6
Fix array dereference not working on externals ( closes #8 )
2023-06-26 01:51:14 +02:00
phobos2077
6f29ffe27e
A shameful display!
2023-06-09 17:55:26 +02:00
phobos2077
148eefccca
Stringspace optimization: also process strings in default values of local and global variables
2023-06-09 16:56:51 +02:00
phobos2077
cf40c78c33
Fix unused procedure optimization
2023-06-09 15:37:27 +02:00
phobos2077
fcea09ea73
Rewrite "stringify" logic for consistency and take it into account when removing unused strings
2023-06-09 15:13:52 +02:00
phobos2077
bf164be1fc
Fix error in FindVarUsage resulting in node indexes getting borked
2023-06-09 11:15:11 +02:00
phobos2077
e1483a8e44
Fix crash for scripts with no strings
2023-06-09 10:55:54 +02:00
phobos2077
b5b0e2de98
Reduce code duplication between namespace and stringspace optimization
2023-06-09 02:36:11 +02:00
phobos2077
507331ca51
Compress stringspace, closes #5
2023-06-09 01:52:06 +02:00
phobos2077
867be799d2
Fix optimizer not treating CALL as variable use (valid case when variable contains procedure name) - closes #6
2023-06-09 00:54:45 +02:00
phobos2077
ca1746a1f7
Fix erronous "symbol or string expected" when trying to call procedure using a string literal (valid case)
2023-06-09 00:49:55 +02:00
phobos2077
9d1c521869
Gitignore
2023-06-09 00:49:12 +02:00
phobos2077
8162a01b63
Full optimization: don't eliminate proc args if any consequent args were used, to prevent invalid values ( closes #4 )
...
- This happens because proc will still have it's original arg count and calling side will still pass all arguments, but inside the proc, wrong argument will be used, due to how variable removal works
2023-05-25 01:48:32 +02:00
phobos2077
a7375398d2
Fill extern procedure variable list when it's defined ( closes #3 )
...
- This satisfies expectation in procedure() that forward-declared procedures already have variable list initialized, thus preventing crash
2023-05-24 00:31:40 +02:00