enigma-dev / enigma-dev/enigma-dev
Parser/Coding Tasks and Issues
- Dominant language
- C++
- Stars
- 379
- Forks
- 125
- PR merge metrics
- No merged PRs in 30d
Description
This is a list of incompatibilities that exist as of now, most of these should be fix when the new parser arrives but it's best they all be checked when it does.
- [x] Negative values are treated as false which causes some games like the FPS example to not work out of the box. #27 #1208
- [ ] Bitwise inversion operator is ambiguous #30
- [x] Calling a script in an unused script causes an error
- [x] `argument_count` from GM8.1 is not implemented for scripts #1020
- [ ] Inside with statement variable scoping inside max/min is messed up
- [ ] Inside with statement `bool col = place_meeting(x,y,obj);` parses to: `bool col = place_meeting(enigma::glaccess(int(self))-> x, y, obj);` [possibly related to min/max scoping issue]
- [ ] Local object variables used in extension functions become corrupted when set
- [ ] Can't use member variables in functions using var args without using self.
- [ ] Declaring `local int i = int(1)` parses to `variant enigma::OBJ_obj_0::myevent_create() { enigma::temp_event_scope ENIGMA_PUSH_ITERATOR_AND_VALIDATE(this); {i = i return 0; }`
- [ ] The function real(string) only works with variant/var
- [x] Comparison <> is not added for !=
- [x] Operator ^^ is not added as xor comparison
- [x] Begin and end not added as { and }
- [ ] global var doesn't work with arrays
- [ ] global var doesn't work when in the room creation event or when used in a script
- [x] using a 2D array inside string() causes an error
- [x] `return x == y;` parses as => `return x === y;` (using braces around the statement it's fine)
- [ ] Using `with(obj) script();` doesn't seem to recognize locals in obj even when they are used in obj. EDIT: It appears that the scope for the script stays in the original object it's called it, instead of changing due to the with statement.
- [ ] When calling in obj1 `with (whatever) {a = 0;}` it creates the local variable a for obj1, which isn't needed/inefficient considering it's inside a with statement. The same thing applies for scripts, `with (whatever) {scr1();}` will link the script local to obj1.
- [ ] using `with(player) {camera.x = x; camera.y = y;}` it is parsing as:
``` cpp
enigma::glaccess(int(enigma::varaccess_camera(int(self))))-> x = enigma::glaccess(int(self))-> x;
enigma::glaccess(int(camera))-> y = enigma::glaccess(int(self))-> y
```
the mistake on the identical 2nd line is that it is not applying varaccess to camera, in fact it seems like that 1st line breaks things somehow as it puts varaccess on camera everywhere before that line is used then doesn't put varaccess on every instance of camera after that line
- [ ] Parsing information needed to add function and identifier localization #950
- [ ] Parser lacks sufficient information to not place semicolons inside initialization lists (#920 and #916).
When completed this setting should actually have 3 options "Skip", "Error", "Insert"
The first skips this phase all together, the second will error on missing semicolons, and the final one will insert them automatically like GameMaker.
- [ ] The parser for some reason does not cast some array subscripts in pretty printed code #921
- [ ] Everybody wants code refactoring so you can rename a resource and have it update all the places it was referenced in code #882
- [ ] Arguments are not evaluated left to right as they were in GM8.1. This is because optimizing compilers can and usually evaluate right to left. #489
- Syntax checker should warn when using a stateful function in multiple parameters
- [x] Syntax checking should check for attempted assignment to functions returning void and throw a warning https://github.com/enigma-dev/lgmplugin/issues/39
- [ ] local keyword is ambiguous #33
- [ ] GML allows redeclaration of vars #1025
- [ ] Prior to GMS a script with the same name as a built-in function would override the built-in function and be used in place of it. #273
- [ ] Variadic/varargs functions like choose/min/max have problems with instance locals inside scripts #214
- [ ] variables passed to min/max in scripts behave as if they are uninitialized #1200
----------
### EDIT 2020-04-06
Problems building some popular GM games.
- [ ] `%` → `mod` for GM:S compatibility. (Both behave like fmod.)
- [ ] `and`/`or` -> `&&`/`||`, or fix spacing. Otherwise, `a == "str"and b` ends up attempting `operator""and` on `"str"`.
- [ ] as a script, `ds_list_add ( list , argument0 )` will crash during "link"
- [ ] Clang warns on spacing around - in `a =- 1;`
- [ ] Trigraphs can appear in string literals, leading to warnings. E.g, `"Hello???"`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.