- 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

+18
View File
@@ -0,0 +1,18 @@
<?php
namespace Picea\Syntax;
class EchoRawToken implements Syntax {
public string $tokenOpen = "\{\{=";
public string $tokenClose = "\}\}";
public function parse(/*\Picae\Compiler\Context*/ &$content, string &$sourceCode)
{
$sourceCode = preg_replace_callback("#({$this->tokenOpen})(.*?)({$this->tokenClose})#s", function ($matches) {
return "<?php echo {$matches[2]} ?>";
}, $sourceCode);
}
}