summaryrefslogtreecommitdiff
path: root/modules/regex/SCsub
AgeCommit message (Collapse)Author
2020-12-18SCons: Add explicit dependencies on thirdparty code in cloned envRémi Verschelde
Since we clone the environments to build thirdparty code, we don't get an explicit dependency on the build objects produced by that environment. So when we update thirdparty code, Godot code using it is not necessarily rebuilt (I think it is for changed headers, but not for changed .c/.cpp files), which can lead to an invalid compilation output (linking old Godot .o files with a newer, potentially ABI breaking version of thirdparty code). This was only seen as really problematic with bullet updates (leading to crashes when rebuilding Godot after a bullet update without cleaning .o files), but it's safer to fix it everywhere, even if it's a LOT of hacky boilerplate.
2020-06-11Enable Unicode support for RegEx classMaganty Rushyendra
Build PCRE2 thirdparty library with unicode support. RegEx objects in Godot can now be used to recognize unicode strings.
2020-03-30SCons: Format buildsystem files with psf/blackRémi Verschelde
Configured for a max line length of 120 characters. psf/black is very opinionated and purposely doesn't leave much room for configuration. The output is mostly OK so that should be fine for us, but some things worth noting: - Manually wrapped strings will be reflowed, so by using a line length of 120 for the sake of preserving readability for our long command calls, it also means that some manually wrapped strings are back on the same line and should be manually merged again. - Code generators using string concatenation extensively look awful, since black puts each operand on a single line. We need to refactor these generators to use more pythonic string formatting, for which many options are available (`%`, `format` or f-strings). - CI checks and a pre-commit hook will be added to ensure that future buildsystem changes are well-formatted.
2019-11-20pcre2: Use scons option to disable JIT on some platformsRémi Verschelde
Third-party platforms (e.g. console ports) need to be able to disable JIT support in the regex module too, so it can't be hardcoded in the module SCsub. This is cleaner this way anyway. Fixes #19316.
2019-07-11pcre2: Update to upstream version 10.33Rémi Verschelde
2019-07-03SCons: Use CPPDEFINES instead of CPPFLAGS for pre-processor definesRémi Verschelde
It's the recommended way to set those, and is more portable (automatically prepends -D for GCC/Clang and /D for MSVC). We still use CPPFLAGS for some pre-processor flags which are not defines.
2019-04-30SCons: Always use env.Prepend for CPPPATHRémi Verschelde
Include paths are processed from left to right, so we use Prepend to ensure that paths to bundled thirdparty files will have precedence over system paths (e.g. `/usr/include` should have lowest priority).
2018-09-28SCons: Build thirdparty code in own env, disable warningsRémi Verschelde
Also remove unnecessary `Export('env')` in other SCsubs, Export should only be used when exporting *new* objects.
2018-05-28update PCRE2 to version 10.31, fixes #15662firefly2442
2017-10-23Add UWP to Regex JIT blacklistGeorge Marques
PCRE2 JIT uses functions not available in UWP, which makes it fail to link.
2017-09-25Use BoolVariable for third-party options.Elliott Sales de Andrade
2017-09-01Disabled PCRE-JIT in HTML5. Fixes #10834Zher Huei Lee
2017-08-19Replacement of internal RegEx with PCRE2Zher Huei Lee
The pattern and replacement matching behaviour has been changed purely due to the nature of switching to a standards-compliant library. One mistake in the previous behaviour was that named groups didn't have a number. This has been corrected. As names are actually just an alias of numbered groups, RegExMatch::get_name_dict() is now get_names() and is a dict referring to the group number it represents. Duplicate names are enabled and the with the first matching instance used. Due the lack of a suitable equivalent in PCRE2, RegExMatch::expand() was removed.
2016-10-27RegEx re-implemented as a moduleZher Huei Lee
Re-wrote nrex as a module using godot-specific parts and new features: * Added string substitutions. * Named groups are now supported. * Removed use of mutable variables in RegEx. RegExMatch is returned instead.