PluginProbe
SQLite Database Integration / 3.0.1
SQLite Database Integration v3.0.1
3.0.2 3.0.1 trunk 2.1.13 2.1.14 2.1.15 2.1.16 2.2.0 2.2.1 2.2.10 2.2.11 2.2.12 2.2.13 2.2.14 2.2.15 2.2.16 2.2.17 2.2.18 2.2.19 2.2.2 2.2.20 2.2.21 2.2.22 2.2.23 2.2.3 All 32 releases
sqlite-database-integration / wp-includes / database / mysql / native / mysql-rust-bridge.php

mysql-rust-bridge.php in SQLite Database Integration 3.0.1, at wp-includes/database/mysql/native/mysql-rust-bridge.php

25 lines 746 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Bridge helpers for the optional Rust MySQL lexer/parser extension.
5 * PHP keeps the grammar object, while Rust owns the exported parser state.
6 */
7
8 /**
9 * Export grammar internals for the native parser.
10 *
11 * @access private
12 *
13 * @param WP_Parser_Grammar $grammar Parser grammar.
14 * @return array<string, mixed>
15 */
16 function wp_sqlite_mysql_native_export_grammar( WP_Parser_Grammar $grammar ): array {
17 return array(
18 'highest_terminal_id' => $grammar->highest_terminal_id,
19 'rules' => $grammar->rules,
20 'lookahead_is_match_possible' => $grammar->lookahead_is_match_possible,
21 'rule_names' => $grammar->rule_names,
22 'fragment_ids' => $grammar->fragment_ids,
23 );
24 }
25