- First commit of first draft

This commit is contained in:
mcndave committed 2019-08-21 16:11:39 -04:00
commit 66c7b349d1
36 files changed
+820

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
<?php
namespace Picea\Extension;
class JsonExtension implements Extension {
public string $token = "json";
public int $flags = JSON_HEX_TAG | \JSON_HEX_APOS | \JSON_HEX_QUOT | \JSON_THROW_ON_ERROR;
public function parse(/*\Picae\Compiler\Context*/ &$context, ?string $arguments) {
return "<?php echo json_encode($arguments, {$this->flags}) ?>";
}
}