Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subexpression with a string where zero spaces occur before parenthesis breaks Parser #357

Open
tunnela opened this issue Nov 4, 2021 · 0 comments

Comments

@tunnela
Copy link

tunnela commented Nov 4, 2021

The PHP Code:

require('../vendor/autoload.php');

use LightnCandy\LightnCandy;

// The Template:
$template = <<<VAREND
{{{debug (debug 'foobar(moo).')}}}
VAREND;

$phpStr = LightnCandy::compile($template, array(
    'flags' => LightnCandy::FLAG_HANDLEBARS | LightnCandy::FLAG_ERROR_EXCEPTION
));

echo "Generated PHP Code:\n$phpStr\n";

The Issue:

The issue is very similar to #281 and #295. The error message is Error in 'echo (echo "foobar(moo).")': expect ')' but the token ended!!.

tunnela pushed a commit to tunnela/lightncandy that referenced this issue Nov 4, 2021
tunnela pushed a commit to tunnela/lightncandy that referenced this issue Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant