public function AddConstant(
        \Peg\Lib\Definitions\Element\Constant $constant, 
        $namespace = "\\"
    )
    {
        $this->CreateNamespace($namespace);
        
        $constant->header =& $this;
        $constant->namespace =& $this->namespaces[$namespace];

        $this->namespaces[$namespace]->constants[$constant->name] = $constant;
    }
public function AddConstant(
        \Peg\Lib\Definitions\Element\Constant $constant, 
        $namespace = "\\"
    )
    {
        $this->CreateNamespace($namespace);
        
        $constant->header =& $this;
        $constant->namespace =& $this->namespaces[$namespace];

        $this->namespaces[$namespace]->constants[$constant->name] = $constant;
    }
public function AddConstant ( \ Peg \ Lib \ Definitions \ Element \ Constant $ constant , $ namespace = "\\" ) { $ this -> CreateNamespace ( $ namespace ) ; $ constant -> header = & $ this ; $ constant -> namespace = & $ this -> namespaces [ $ namespace ] ; $ this -> namespaces [ $ namespace ] -> constants [ $ constant -> name ] = $ constant ; }
Adds a new constant.
@param \Peg\Lib\Definitions\Element\Constant $constant
@param string $namespace
Adds a new constant .