[RegEx] Add show_error parameter to control error printing on compilation fail

This commit is contained in:
Nikita\Nick 2024-08-28 15:35:42 +03:00
parent f648de1a83
commit ebb5a5cc3d
5 changed files with 78 additions and 13 deletions

View file

@ -58,15 +58,17 @@
<method name="compile">
<return type="int" enum="Error" />
<param index="0" name="pattern" type="String" />
<param index="1" name="show_error" type="bool" default="true" />
<description>
Compiles and assign the search pattern to use. Returns [constant OK] if the compilation is successful. If an error is encountered, details are printed to standard output and an error is returned.
Compiles and assign the search pattern to use. Returns [constant OK] if the compilation is successful. If compilation fails, returns [constant FAILED] and when [param show_error] is [code]true[/code], details are printed to standard output.
</description>
</method>
<method name="create_from_string" qualifiers="static">
<return type="RegEx" />
<param index="0" name="pattern" type="String" />
<param index="1" name="show_error" type="bool" default="true" />
<description>
Creates and compiles a new [RegEx] object.
Creates and compiles a new [RegEx] object. See also [method compile].
</description>
</method>
<method name="get_group_count" qualifiers="const">