Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "phalcon/volt",
"description": "Phalcon Volt is a HTML template engine for sender-side rendering.",
"version": "1.0.0",
"keywords": [
"phalcon",
"volt",
Expand Down
17 changes: 10 additions & 7 deletions resources/files/parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -3528,12 +3528,8 @@ function phvolt_ret_for_statement(
): void
{
$ret = [
"type" => Compiler::PHVOLT_T_FOR,
"type" => Compiler::PHVOLT_T_FOR,
"variable" => $variable->getValue(),
"expr" => $expr,
"block_statements" => $block_statements,
"file" => $state->getActiveFile(),
"line" => $state->getActiveLine(),
];

unset($variable);
Expand All @@ -3543,9 +3539,15 @@ function phvolt_ret_for_statement(
unset($key);
}

$ret["expr"] = $expr;

if ($if_expr !== null) {
$ret["if_expr"] = $if_expr;
}

$ret["block_statements"] = $block_statements;
$ret["file"] = $state->getActiveFile();
$ret["line"] = $state->getActiveLine();
}

function phvolt_ret_literal_zval(&$ret, $type, ?Token $token = null, ?State $state = null): void
Expand Down Expand Up @@ -3596,8 +3598,6 @@ function phvolt_ret_macro_call_statement(&$ret, $expr, $arguments, $caller, Stat
$ret = [
"type" => Compiler::PHVOLT_T_CALL,
"name" => $expr,
"file" => $state->getActiveFile(),
"line" => $state->getActiveLine(),
];

if ($arguments !== null) {
Expand All @@ -3607,6 +3607,9 @@ function phvolt_ret_macro_call_statement(&$ret, $expr, $arguments, $caller, Stat
if ($caller !== null) {
$ret["caller"] = $caller;
}

$ret["file"] = $state->getActiveFile();
$ret["line"] = $state->getActiveLine();
}

function phvolt_ret_echo_statement(&$ret, $expr, State $state): void
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class Compiler
public const PHVOLT_T_AND = 266;
public const PHVOLT_T_ARRAY = 360;
public const PHVOLT_T_ARRAYACCESS = 361;
public const PHVOLT_T_ASSIGN = 64; //'=';
public const PHVOLT_T_ASSIGN = 61; //'=';
public const PHVOLT_T_AUTOESCAPE = 317;
public const PHVOLT_T_BLOCK = 307;
public const PHVOLT_T_BREAK = 320;
Expand Down
Loading