File dsl/ast/DslInteger.class.php

Last commit: Mon Jun 6 14:06:46 2022 +0200	Jan Dankert	First commit after fetching from upstream repo.
1 <?php 2 3 namespace dsl\ast; 4 5 class DslInteger implements DslStatement 6 { 7 private $number; 8 9 /** 10 * DslInteger constructor. 11 * @param $number 12 */ 13 public function __construct($number) 14 { 15 $this->number = $number; 16 } 17 18 19 public function execute( & $context ) { 20 21 return intval($this->number); 22 } 23 24 public function parse($tokens) 25 { 26 $firstToken = $tokens[0]; 27 $this->number = intval( $firstToken->value ); 28 } 29 }
Download dsl/ast/DslInteger.class.php
History Mon, 6 Jun 2022 14:06:46 +0200 Jan Dankert First commit after fetching from upstream repo.