| #
71096e46 |
| 18-Apr-2026 |
Andreas Gohr <andi@splitbrain.org> |
move handler methods into ParserMode classes and rename Handler
Each ParserMode class now implements handle() from ModeInterface, containing the token handling logic that previously lived as individ
move handler methods into ParserMode classes and rename Handler
Each ParserMode class now implements handle() from ModeInterface, containing the token handling logic that previously lived as individual methods on Doku_Handler.
The Handler class (formerly Doku_Handler) is the single dispatch point: Lexer passes tokens to Handler::handleToken() which routes to mode objects, plugins, or returns false. The Lexer only tokenizes and resolves mapHandler aliases.
Key changes: - Add handle() to ModeInterface, implemented by all mode classes - Move Doku_Handler to dokuwiki\Parsing\Handler namespace - File extends Code (shared parsing via $type property) - Quotes uses mapHandler() + Handler::getModeName() for sub-modes - Media::parseMedia() replaces Doku_Handler_Parse_Media() - Code::parseHighlightOptions() replaces parse_highlight_options() - Per-parse state (footnote, doublequote) stays on Handler - Deprecated wrappers kept for base/header/internallink/media - Class alias and rector rules added for backward compatibility
show more ...
|
| #
f8026da1 |
| 16-Apr-2026 |
Andreas Gohr <gohr@cosmocode.de> |
replace magic strings with class constants in Lexer
Introduce MODE_EXIT and MODE_SPECIAL_PREFIX constants to replace the undocumented "__exit" and "_" string conventions used for mode transitions.
|
| #
6c16a3a9 |
| 14-Sep-2023 |
fiwswe <fiwswe@fwml.de> |
Use str_starts_with/str_ends_with
|
| #
d4f83172 |
| 31-Aug-2023 |
Andreas Gohr <andi@splitbrain.org> |
code style: line breaks
|
| #
90fb952c |
| 31-Aug-2023 |
Andreas Gohr <andi@splitbrain.org> |
code style: operator spacing
|
| #
bcaec9f4 |
| 29-Aug-2023 |
Andreas Gohr <andi@splitbrain.org> |
Apply rector fixes to inc/Parsing
|
| #
ec34bb30 |
| 19-Oct-2022 |
Andreas Gohr <andi@splitbrain.org> |
Update core code to make use of sexplode()
This makes use of our own explode mechanism everywhere were we expect a fixed number of results.
|
| #
46028c4c |
| 04-Jun-2020 |
Andreas Gohr <andi@splitbrain.org> |
Move defines to their own file
As described in https://github.com/dwp-forge/columns/issues/5#issuecomment-638467603 sometime the Lexer constants have not been (auto)loaded when a syntax plugin is in
Move defines to their own file
As described in https://github.com/dwp-forge/columns/issues/5#issuecomment-638467603 sometime the Lexer constants have not been (auto)loaded when a syntax plugin is invoked (I'm not sure why).
In general PSR2 discourages a mix of main code and function/class setup with the call to define() being considered main code.
This patch moves these the define calls to a separate new file, solving both of the above problems.
These are not all our defines. Instead I focused on the ones that are ENUM-like.
In the future we should think about what defines can be replaced by class constants and what other define() calls should be moved.
show more ...
|
| #
368a782f |
| 08-Apr-2020 |
Anna Dabrowska <dabrowska@cosmocode.de> |
Let plugins access the lexer mode stack
|
| #
661c1ddc |
| 23-May-2018 |
Christopher Smith <chris@jalakai.co.uk> |
Make lexer/state stack more understandable - rename lexer $mode property to avoid two different uses of "mode" variables in the lexer - clarify/improve comments
|
| #
be906b56 |
| 04-May-2018 |
Andreas Gohr <andi@splitbrain.org> |
moved all parsing related namespaces to their own
|