/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/block-serialization-spec-parser/bin/create-php-parser.js
21 строка
492 B
Marco Ciampini
ESLint: Replace strict config with bulk suppressions (#81248)
07 авг 2026, 14:34
Не верифицирован
07 авг 2026, 14:34
7f43eaf
Код
Авторство
О чём код?
#!/usr/bin/env node const fs = require( 'fs' ); const path = require( 'path' ); const pegjs = require( 'pegjs' ); const phpegjs = require( 'phpegjs' ); const peg = fs.readFileSync( path.join( __dirname, '..', 'grammar.pegjs' ), 'utf8' ); const parser = pegjs.generate( peg, { plugins: [ phpegjs ], phpegjs: { parserNamespace: null, parserGlobalNamePrefix: 'Gutenberg_PEG_', mbstringAllowed: false, }, } ); fs.writeFileSync( path.join( __dirname, '..', 'parser.php' ), parser );