1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-11-30 04:19:30 +01:00

fixes a bug were line number were lost

This commit is contained in:
Johannes M. Schmitt 2012-05-03 23:58:47 -05:00
parent 0dae07af6b
commit c2c7fdd13d

View File

@ -104,7 +104,7 @@ class PHPParser_NodeVisitor_NameResolver extends PHPParser_NodeVisitorAbstract
$name->prepend($this->namespace);
}
return new PHPParser_Node_Name_FullyQualified($name->parts);
return new PHPParser_Node_Name_FullyQualified($name->parts, $name->getLine());
}
protected function resolveOtherName(PHPParser_Node_Name $name) {
@ -122,7 +122,7 @@ class PHPParser_NodeVisitor_NameResolver extends PHPParser_NodeVisitorAbstract
$name->prepend($this->namespace);
}
return new PHPParser_Node_Name_FullyQualified($name->parts);
return new PHPParser_Node_Name_FullyQualified($name->parts, $name->getLine());
}
protected function addNamespacedName(PHPParser_Node $node) {
@ -130,7 +130,7 @@ class PHPParser_NodeVisitor_NameResolver extends PHPParser_NodeVisitorAbstract
$node->namespacedName = clone $this->namespace;
$node->namespacedName->append($node->name);
} else {
$node->namespacedName = new PHPParser_Node_Name($node->name);
$node->namespacedName = new PHPParser_Node_Name($node->name, $node->getLine());
}
}
}