- Finalizing the documentation before tagging 1.0 release

This commit is contained in:
mcndave committed 2022-12-21 04:20:11 +00:00
1 parent bb29a56077
commit 46535c2734
29 files changed
+933 -211

No files matched your search

+1 -1
View File
@@ -33,7 +33,7 @@ class BlockToken implements ControlStructure {
sprintf('A block awaiting arguments `%s` instead received `%s` with values `%s`', '$arguments', implode(', ', array_map('gettype', \$inlineVariables ?? [])), json_encode(\$inlineVariables))
);
}
?>
/*%EXCEPTION_LINE_BASE%*/?>
PHP;
case "define":
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace Picea\ControlStructure;
class EchoToken implements ControlStructure {
public array $token = [ "echo", "echo.raw" ];
public function parse(\Picea\Compiler\Context &$context, ?string $arguments, string $token) {
switch($token) {
case "echo":
return "<?php \\Picea\\ControlStructure\\EchoToken::echoSafe($arguments) ?>";
case "echo.raw":
return "<?php \\Picea\\ControlStructure\\EchoToken::echoRaw($arguments) ?>";
}
}
public static function echoRaw($arguments) : string
{
return "<?php echo $arguments ?>";
}
public static function echoSafe($arguments) : string
{
return "<?php echo $arguments ?>";
}
}
-12
View File
@@ -1,12 +0,0 @@
<?php
namespace Picea\ControlStructure;
class EndRawToken implements ControlStructure {
public string $token = "endraw";
public function parse(\Picea\Compiler\Context &$context, ?string $arguments, string $token) {
}
}
+2 -1
View File
@@ -9,6 +9,8 @@ class FunctionToken implements ControlStructure {
public function parse(\Picea\Compiler\Context &$context, ?string $arguments, string $token) {
switch($token) {
case "function":
$context->functions++;
return $this->printFunction($context, $arguments);
case "return":
@@ -31,7 +33,6 @@ class FunctionToken implements ControlStructure {
protected function printFunction($context, ?string $arguments) : string
{
$context->functions++;
return "<?php function $arguments { ?>";
}
+2 -2
View File
@@ -6,7 +6,7 @@ class IncludeToken implements ControlStructure {
public string $token = "include";
public function parse(\Picea\Compiler\Context &$context, ?string $arguments, string $token) {
return "<?php echo \$___class__template->picea->inlineContent($arguments); ?>";
public function parse(\Picea\Compiler\Context &$context, ? string $viewPath, string $token) {
return "<?php echo \$___class__template->picea->inlineContent($viewPath); ?>";
}
}
-12
View File
@@ -1,12 +0,0 @@
<?php
namespace Picea\ControlStructure;
class RawToken implements ControlStructure {
public string $token = "raw";
public function parse(\Picea\Compiler\Context &$context, ?string $arguments, string $token) {
}
}