Commit 857fbec
authored
Add Rust parser bridge helpers (#389)
## Summary
When a native MySQL parser extension declares `WP_MySQL_Native_Parser`,
load a small bridge file that exposes `WP_Parser_Grammar` internals to
the extension. The native parser needs the grammar's terminal table,
rules, and lookahead map, but those live on a PHP object — the bridge
function hands them out as a plain array the extension can consume.
The bridge file lives under `mysql/native/` since it's only required
when a native parser is in use.
## Testing
- `php -l` on changed files
- `phpcs` clean1 parent ff36738 commit 857fbec
2 files changed
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments