Collapse more generated files in PRs (#8754)

* The generated VM files
* tokenizer_data.c
This commit is contained in:
Ilija Tovilo 2022-06-12 10:56:35 +02:00 committed by GitHub
parent 13479ee2bd
commit 3f7ec69b61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 5 deletions

4
.gitattributes vendored
View File

@ -19,5 +19,7 @@
*.php diff=php
*.[ch] diff=cpp
# Collapse the generated arginfo.h files within a pull request.
# Collapse generated files within a pull request.
**/*_arginfo.h linguist-generated
/Zend/zend_vm_execute.h linguist-generated
/Zend/zend_vm_opcodes.{h,c} linguist-generated

View File

@ -10,4 +10,5 @@ runs:
Zend/zend_vm_gen.php
build/gen_stub.php -f
build/gen_stub.php --generate-optimizer-info
ext/tokenizer/tokenizer_data_gen.php
git add . -Nu && git diff --exit-code

View File

@ -43,7 +43,7 @@ const HEADER_TEXT = <<< DATA
DATA;
/*
This script creates zend_vm_execute.h and zend_vm_opcodes.h
This script creates zend_vm_execute.h and zend_vm_opcodes.{h,c}
from existing zend_vm_def.h and zend_vm_execute.skl
*/

2
ext/tokenizer/.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
# Collapse generated files within a pull request.
/tokenizer_data.c linguist-generated

6
ext/tokenizer/tokenizer_data_gen.php Normal file → Executable file
View File

@ -1,8 +1,8 @@
#!/usr/bin/env php
<?php
$rootDir = __DIR__ . '/../..';
$infile = $rootDir . '/Zend/zend_language_parser.y';
$outfile = $rootDir . '/ext/tokenizer/tokenizer_data.c';
$infile = __DIR__ . '/../../Zend/zend_language_parser.y';
$outfile = __DIR__ . '/tokenizer_data.c';
if (!file_exists($infile)) {
fwrite(STDERR, <<<ERROR