parse() public method

Parses the statements defined by the tokens list.
public parse ( Parser $parser, TokensList $list ) : void
$parser Parser The instance that requests parsing.
$list TokensList The list of tokens to be parsed.
return void
 /**
  * @param Parser     $parser The instance that requests parsing.
  * @param TokensList $list   The list of tokens to be parsed.
  *
  * @return void
  */
 public function parse(Parser $parser, TokensList $list)
 {
     parent::parse($parser, $list);
     // Checks the type of this query.
     if ($this->options->has('START TRANSACTION') || $this->options->has('BEGIN')) {
         $this->type = TransactionStatement::TYPE_BEGIN;
     } elseif ($this->options->has('COMMIT') || $this->options->has('ROLLBACK')) {
         $this->type = TransactionStatement::TYPE_END;
     }
 }