- First commit of first draft
This commit is contained in:
commit
66c7b349d1
36 files changed
+820
No files matched your search
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Picea\ControlStructure;
|
||||
|
||||
class DefaultToken implements ControlStructure {
|
||||
|
||||
public string $token = "default";
|
||||
|
||||
public function parse(/*\Picae\Compiler\Context*/ &$context, ?string $arguments) {
|
||||
$output = "";
|
||||
|
||||
if ( $context->switchStack ) {
|
||||
array_pop($context->switchStack);
|
||||
}
|
||||
else {
|
||||
$output = "<?php ";
|
||||
}
|
||||
|
||||
return ( $output ?? "" ) . "default: ?>";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user