- Added while/endwhile and do/while syntaxes
- Fix the abstractclass requirement of parse() function
This commit is contained in:
1 parent
33298ff2e4
commit
bb29a56077
36 files changed
+115
-73
No files matched your search
@@ -6,9 +6,9 @@ class OrToken implements ControlStructure {
|
||||
|
||||
public string $token = "or";
|
||||
|
||||
public function parse(/*\Picae\Compiler\Context*/ &$context, ?string $arguments, string $token) {
|
||||
public function parse(\Picea\Compiler\Context &$context, ?string $arguments, string $token) {
|
||||
if ( empty($context->iterationStack) ) {
|
||||
throw new \LogicException("Token `or` was used outside of iterator. Make sure your `for` or `foreach` declaration are properly made.");
|
||||
throw new \LogicException("Token `or` was used outside of iterator. Make sure your `for`, `foreach`, `while`, `do/until` declaration are properly made.");
|
||||
}
|
||||
|
||||
$key = count( $context->iterationStack ) - 1;
|
||||
|
||||
Reference in new issue
Block a user