Commit Graph
310 Commits
Author SHA1 Message Date
Jaime Humberto Macias Bustamante cae6d5072c Improved "null" handling 2025-05-13 12:04:49 -07:00
Jaime Humberto Macias Bustamante 8dce40354a "null" access handling + get/set for variables
- It handles "null" allowing access only inside of the class.

- "final" variables can be initialized in the constructor if they doesn't have a default value.

- "var a(get, set):Int" is parsed outside of Custom Class, but for now it doesn't call their accessors.

almost finished :3
2025-05-13 00:38:11 -07:00
Jaime Humberto Macias Bustamante 19b5b2b049 getter, setter and final for Custom Classes
full support for "var a(get, set):Int".
Also, it takes into account final vars

Soon for inline custom classes

[UNTESTED]
2025-05-12 11:27:43 -07:00
Jaime Humberto Macias Bustamante 64ee722124 Allow trailing array commas (https://github.com/HaxeFoundation/hscript/pull/139) 2025-05-11 12:36:55 -07:00
Jaime Humberto Macias Bustamante 77282e3b7b Update Parser.hx 2025-05-11 12:15:45 -07:00
Jaime Humberto Macias Bustamante 927b72c91a nvm, backward compatibility 2025-05-11 11:42:39 -07:00
Jaime Humberto Macias Bustamante 10b67def74 Moved "resolveField" to "hget" + fixes 2025-05-11 00:27:40 -07:00
Jaime Humberto Macias Bustamante 3f1f0e7234 Simplified Custom Class assignment 2025-05-08 16:25:16 -07:00
Jaime Humberto Macias Bustamante c7160d05fd super Custom Class check + null check optimization 2025-05-07 11:03:22 -07:00
Jaime Humberto Macias Bustamante 05577f7559 Cleanup 2025-05-06 11:58:38 -07:00
Jaime Humberto Macias Bustamante e26385f591 Fixed superClass calling + special operations
Fixed not being able to do "+=" on Custom Classes and getters and setters on constructor.

Also, fixed not being able to call functions from a CustomClass super class.
2025-05-05 21:42:02 -07:00
Jaime Humberto Macias Bustamante 33583e751f Small optimizations 2025-05-05 14:28:44 -07:00
Jaime Humberto Macias Bustamante 742b40c86c The Beginning of the End (Old Custom Class) 2025-05-04 23:20:56 -07:00
Jaime Humberto Macias Bustamante bf602f758b Typedefs for Custom Classes
Only works as an import method, for example: `typedef OtherShader = funkin.backend.shaders.CustomShader;`.
2025-05-04 20:13:01 -07:00
Jaime Humberto Macias Bustamante 34b07378fd Fix 1e parsing
Fix 1e5, 1e-5 evaluated as Infinity (https://github.com/HaxeFoundation/hscript/pull/132)
2025-04-10 14:51:36 -07:00
Jaime Humberto Macias Bustamante 6622220415 Array parse fix
Do not allow arrays without comma between values (https://github.com/HaxeFoundation/hscript/pull/138)
2025-04-09 11:57:04 -07:00
Jaime Humberto Macias Bustamante ca0599b180 capture variables for inline Custom Classes 2025-04-09 11:43:06 -07:00
Jaime Humberto Macias Bustamante d055203559 Public vars for Custom Classes in scripts
Uses public variables from the same scope as where the class was defined.
2025-04-08 11:48:31 -07:00
Jaime Humberto Macias Bustamante 65b43ebe78 Custom Classes inside of scripts 2025-04-07 11:52:49 -07:00
Jaime Humberto Macias Bustamante 9aa3481f62 superClass thing improvement
STILL IN PROGRESS
2025-04-05 19:48:59 -07:00
Jaime Humberto Macias Bustamante e087521a36 Update CustomClassDecl.hx
oops
2025-04-03 16:08:25 -07:00
Jaime Humberto Macias Bustamante f43221c3bb "Type" for Custom Classes - Part II
- Move the superClass instantiation to CustomClassDecl
- Imported classes available for Static Functions

Warning: untested code.
2025-03-27 16:02:06 -07:00
Jaime Humberto Macias Bustamante e71f5a0471 "Type" for Custom Classes 2025-03-24 20:28:29 -07:00
Jaime Humberto Macias Bustamante 73c17e51dc Enums, new import blocklist and redirects
warning: untested
2025-03-24 11:58:56 -07:00
Jaime Humberto Macias Bustamante e6b5d6af49 ".bind" support + "package;" 2025-03-04 20:26:32 -07:00
Jaime Humberto Macias Bustamante 9833c61f78 Using and Enums
Based on Enums and Using system from hscript-iris, mostly made by ne_eo.
2025-03-03 21:53:02 -07:00
Jaime Humberto Macias Bustamante a1ee770794 oops :3 2025-02-04 00:57:53 -07:00
Jaime Humberto Macias Bustamante 270087fc62 Update Parser.hx
forgot to put the "EIgnore" work
2025-02-03 20:35:10 -07:00
Jaime Humberto Macias Bustamante bd0ae3fbe1 Typedef support
Original Implementation by ne_eo for hscript-iris.

For now only works for normal scripts and making import redirects. Soon for custom classes.
2025-02-03 00:00:15 -07:00
Jaime Humberto Macias Bustamante 241d97aed0 Import aliases for Custom Classes
Import aliases support for Custom Classes. This allows you to import classes and other custom classes with an alias inside of a Custom Class.

This includes some improvements on "parseModuleDecl()"
2025-02-01 21:00:41 -07:00
Jaime Humberto Macias Bustamante b25ecb08bc Function Call reimplemented
The previous function call system has a serious issue. It can not differentiate between class fields and function argument fields.
2025-01-21 22:07:41 -07:00
Jaime Humberto Macias Bustamante c45373aa55 Custom Classes Rework 2025-01-21 00:27:11 -07:00
Ne_Eo fe673c21b2 Forgot to change this back to false 2025-01-19 21:08:40 +01:00
Ne_Eo 77420e9873 Bug fix with locals + Compatibility improvement 2025-01-19 21:00:20 +01:00
Ne_Eo e4789d9c40 Fix typo 2024-12-16 03:54:00 +01:00
Ne_Eo 9f0937b5c3 Merge branch 'master' into codename-dev 2024-11-15 15:25:22 +01:00
Ne_Eo bb46d45d56 Import Redirects 2024-11-15 15:25:04 +01:00
Ne_Eo ad18c12326 Small change to support more platforms 2024-11-15 14:51:04 +01:00
Redar13andGitHub 3a5c4f2164 Fix ending in with #end in the file (#5)
* Update Parser.hx

* Update Parser.hx
2024-11-06 16:39:09 +01:00
Ne_Eo b683c981b0 no more safe casts 2024-10-18 02:16:50 +02:00
Ne_Eo 9b614421b6 Remove haxe2 support 2024-10-18 01:57:19 +02:00
Ne_Eo 26659db833 Small fix to allow StringMap and such (testing required) 2024-10-04 23:15:50 +02:00
Ne_Eo 6b5a47b017 Fix isBypassAccessor on get resolve 2024-09-04 00:11:19 +02:00
Ne_Eo 3ec4fc9f0b Fixed bug with assign 2024-09-04 00:06:57 +02:00
Ne_Eo 5d2a99d40e More Optimizations 2024-09-03 15:28:33 +02:00
Ne_Eo 1d06905fc5 Optimizations 2024-09-03 14:12:11 +02:00
Ne_Eo 3f98441918 Fixed bugs and ram improvements 2024-09-03 13:42:25 +02:00
Ne_Eo f8e00859cd Inline parses correctly now 2024-09-03 13:10:13 +02:00
Ne_Eo 933c9cb5e3 final function parsing 2024-09-03 05:05:21 +02:00
Ne_Eo 11b3a52287 pain and suffering 2024-09-03 04:58:14 +02:00