QuackCompiler\Parser\Grammar::_constStmt PHP Method

_constStmt() public method

public _constStmt ( )
    public function _constStmt()
    {
        $this->parser->match(Tag::T_CONST);
        $definitions = [];
        $name = $this->identifier();
        $this->parser->match(':-');
        $value = $this->_expr();
        $definitions[] = [$name, $value];
        while ($this->parser->consumeIf(',')) {
            $name = $this->identifier();
            $this->parser->match(':-');
            $value = $this->_expr();
            $definitions[] = [$name, $value];
        }
        return new ConstStmt($definitions);
    }