public function addConstant(ClassConstNode $node)
 {
     foreach ($node->consts as $const) {
         $constant = new ReflectionConstant($const->name);
         $constant->setStartLine((int) $node->getAttribute('startLine'));
         $constant->setEndLine((int) $node->getAttribute('endLine'));
         $constant->setDocComment((string) $node->getDocComment());
         $constant->setValue($this->resolveValue($const->value));
         $this->context->getReflection()->addConstant($constant);
     }
 }
 /**
  * Add a constant to an entity.
  *
  * @param ReflectionConstant $constant
  */
 public function addConstant(ReflectionConstant $constant)
 {
     $this->constants[$constant->getShortName()] = $constant;
     $constant->setDeclaringClassLike($this);
     $constant->setFilename($this->getFileName());
     return $this;
 }