File modules/dsl/ast/DslThrow.class.php

Last commit: Tue Jun 7 23:30:20 2022 +0200	Jan Dankert	New: DSL is now supporting throw statements.
1 <?php 2 3 namespace dsl\ast; 4 5 use dsl\DslRuntimeException; 6 7 class DslThrow implements DslStatement 8 { 9 private $value; 10 11 public function __construct( $expressionTokens ) 12 { 13 $this->value = new DslExpression( $expressionTokens ); 14 } 15 16 /** 17 * @throws DslRuntimeException 18 */ 19 public function execute(& $context ) { 20 21 $value = $this->value->execute( $context ); 22 throw new DslRuntimeException( $value ); 23 } 24 25 public function parse($tokens) 26 { 27 } 28 }
Download modules/dsl/ast/DslThrow.class.php
History Tue, 7 Jun 2022 23:30:20 +0200 Jan Dankert New: DSL is now supporting throw statements.