mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-20 20:40:56 +01:00
Revert "Generated code> make it harder to mark code as generated"
Summary: This reverts commit e15da75687
.
Test Plan: None
Reviewed By: epriestley
Reviewers: epriestley
CC: aran, epriestley
Differential Revision: 762
This commit is contained in:
parent
e15da75687
commit
9e2231f6d6
1 changed files with 1 additions and 24 deletions
|
@ -540,30 +540,7 @@ class DifferentialChangesetParser {
|
|||
ipull($this->intra, 1),
|
||||
$new_corpus);
|
||||
|
||||
|
||||
/**
|
||||
* Generated code should be marked with ' @generated', '{@generated', or
|
||||
* the block must begin with '@generated'.
|
||||
*
|
||||
* Any other instances of '@generated' will be ignored.
|
||||
*/
|
||||
$generated = false;
|
||||
$pos = strpos($new_corpus_block, '@generated');
|
||||
if ($pos === 0) {
|
||||
$generated = true;
|
||||
} else {
|
||||
$prefix_char = substr($new_corpus_block, $pos - 1, 1);
|
||||
switch ($prefix_char) {
|
||||
case ' ':
|
||||
case '{':
|
||||
$generated = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
$generated = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$generated = (strpos($new_corpus_block, '@'.'generated') !== false);
|
||||
|
||||
$this->specialAttributes[self::ATTR_GENERATED] = $generated;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue