Permalink
Browse files

Closes #276, a caching regression introduced in 2.3.1

  • Loading branch information...
manuelpichler committed Nov 23, 2016
1 parent 132c0a5 commit 48d80814b9aa93ae4225ffa4d4e4f04f3da0b3be
@@ -1950,12 +1950,12 @@ protected function isNextTokenArguments()
/**
* This method configures the given node with its start and end positions.
*
* @param \PDepend\Source\AST\ASTNode $node The node to prepare.
*
* @param \PDepend\Source\AST\ASTNode $node
* @param array &$tokens
* @return \PDepend\Source\AST\ASTNode
* @since 0.9.8
*/
protected function setNodePositionsAndReturn(ASTNode $node)
protected function setNodePositionsAndReturn(ASTNode $node, array &$tokens = null)
{
$tokens = $this->stripTrailingComments($this->tokenStack->pop());
@@ -364,7 +364,9 @@ public function getClass($qualifiedName)
*/
public function buildAnonymousClass()
{
return $this->buildAstNodeInstance('ASTAnonymousClass');
return $this->buildAstNodeInstance('ASTAnonymousClass')
->setCache($this->cache)
->setContext($this->context);
}
/**
@@ -241,9 +241,11 @@ protected function parseAnonymousClassDeclaration(ASTAllocationExpression $alloc
$allocation->addChild(
$this->setNodePositionsAndReturn(
$this->parseTypeBody($class)
$this->parseTypeBody($class),
$tokens
)
);
$class->setTokens($tokens);
return $allocation;
}
@@ -55,7 +55,7 @@
/**
* The current cache version.
*/
const VERSION = '@version:cb1970fd585172c5e1b260a6784607df:@';
const VERSION = '@version:29e0576ca411665f3c8d7e29920251da:@';
/**
* Sets the type for the next <em>store()</em> or <em>restore()</em> method

0 comments on commit 48d8081

Please sign in to comment.