Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 991
Zeile 14... Zeile 14...
14
use PhpParser\Node\Scalar\LNumber;
14
use PhpParser\Node\Scalar\LNumber;
15
use PhpParser\Node\Scalar\String_;
15
use PhpParser\Node\Scalar\String_;
16
use PhpParser\Node\Stmt\Class_;
16
use PhpParser\Node\Stmt\Class_;
17
use PhpParser\Node\Stmt\ClassConst;
17
use PhpParser\Node\Stmt\ClassConst;
18
use PhpParser\Node\Stmt\ClassMethod;
18
use PhpParser\Node\Stmt\ClassMethod;
-
 
19
use PhpParser\Node\Stmt\Else_;
-
 
20
use PhpParser\Node\Stmt\ElseIf_;
19
use PhpParser\Node\Stmt\Enum_;
21
use PhpParser\Node\Stmt\Enum_;
20
use PhpParser\Node\Stmt\Interface_;
22
use PhpParser\Node\Stmt\Interface_;
21
use PhpParser\Node\Stmt\Namespace_;
23
use PhpParser\Node\Stmt\Namespace_;
-
 
24
use PhpParser\Node\Stmt\Nop;
22
use PhpParser\Node\Stmt\Property;
25
use PhpParser\Node\Stmt\Property;
23
use PhpParser\Node\Stmt\TryCatch;
26
use PhpParser\Node\Stmt\TryCatch;
24
use PhpParser\Node\Stmt\UseUse;
27
use PhpParser\Node\Stmt\UseUse;
25
use PhpParser\Node\VarLikeIdentifier;
28
use PhpParser\Node\VarLikeIdentifier;
Zeile 874... Zeile 877...
874
            $attributes['endTokenPos'] = $commentEndTokenPos;
877
            $attributes['endTokenPos'] = $commentEndTokenPos;
875
        }
878
        }
876
        return $attributes;
879
        return $attributes;
877
    }
880
    }
Zeile -... Zeile 881...
-
 
881
 
-
 
882
    /** @param ElseIf_|Else_ $node */
-
 
883
    protected function fixupAlternativeElse($node) {
-
 
884
        // Make sure a trailing nop statement carrying comments is part of the node.
-
 
885
        $numStmts = \count($node->stmts);
-
 
886
        if ($numStmts !== 0 && $node->stmts[$numStmts - 1] instanceof Nop) {
-
 
887
            $nopAttrs = $node->stmts[$numStmts - 1]->getAttributes();
-
 
888
            if (isset($nopAttrs['endLine'])) {
-
 
889
                $node->setAttribute('endLine', $nopAttrs['endLine']);
-
 
890
            }
-
 
891
            if (isset($nopAttrs['endFilePos'])) {
-
 
892
                $node->setAttribute('endFilePos', $nopAttrs['endFilePos']);
-
 
893
            }
-
 
894
            if (isset($nopAttrs['endTokenPos'])) {
-
 
895
                $node->setAttribute('endTokenPos', $nopAttrs['endTokenPos']);
-
 
896
            }
-
 
897
        }
-
 
898
    }
878
 
899
 
879
    protected function checkClassModifier($a, $b, $modifierPos) {
900
    protected function checkClassModifier($a, $b, $modifierPos) {
880
        try {
901
        try {
881
            Class_::verifyClassModifier($a, $b);
902
            Class_::verifyClassModifier($a, $b);
882
        } catch (Error $error) {
903
        } catch (Error $error) {