From b3936aa6e16b197e19382c90bf0b4f6786dd6a17 Mon Sep 17 00:00:00 2001 From: Dave Mc Nicoll Date: Thu, 24 Nov 2022 19:56:20 +0000 Subject: [PATCH] - Added a new Picea extension --- src/Picea/Extension.php | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/Picea/Extension.php diff --git a/src/Picea/Extension.php b/src/Picea/Extension.php new file mode 100644 index 0000000..3ae9c3a --- /dev/null +++ b/src/Picea/Extension.php @@ -0,0 +1,33 @@ +register($context); + + $this->taxus = $taxus; + } + + public function register(Context $context) : void + { + $context->pushFunction("taxus", [ $this, 'taxus' ]); + } + + public function parse(/*\Picae\Compiler\Context*/ &$context, ?string $arguments, string $token) { + return ""; + } + + public function taxus(string $name, ...$arguments) : bool + { + return $this->taxus->granted($name, ...$arguments); + } + +}