Regular Expressions followed by a condition containing strings cause doxyqml to error out
If a QML file contains a regular expression used in a JS method, a condition that contains a string will cause doxyqml to error out with:
ERROR:root:Failed to parse doxyqml_regex_issue.qml ERROR:root:Lexer error line 15: Unexpected token: Token(type='block_end', value='}', idx=246, column=0)
^ Traceback (most recent call last): File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "C:\Python311\Scripts\doxyqml.exe__main__.py", line 7, in
File "C:\Python311\Lib\site-packages\doxyqml\main.py", line 175, in main
qmlparser.parse(lexer.tokens, qml_class, not args.no_nested_components)
File "C:\Python311\Lib\site-packages\doxyqml\qmlparser.py", line 353, in parse
parse_footer(reader, cls)
File "C:\Python311\Lib\site-packages\doxyqml\qmlparser.py", line 303, in parse_footer
raise QmlParserUnexpectedTokenError(token)
doxyqml.qmlparser.QmlParserUnexpectedTokenError: Unexpected token: Token(type='block_end', value='}', idx=246, column=0)
You can reproduce this using the attached QML file. Commenting out the line containing the regular expression or removing any conditions with strings in them after it will allow doxyqml to run normally.