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

Already on GitHub? Sign in to your account

Patch to make [% UNLESS "0" %]...[% END %] work as in Perl/TT2 #1

merged 2 commits into from Jul 11, 2011


None yet
3 participants

audreyt commented Jan 2, 2011

Happy new year! :-)

* Change the UNLESS rule to emit "if (... == false)" instead of "if (…

  to match Perl/TT2's behavior where the string "0" works as "false".

  (In JavaScript (!"0") evaluates to false, but ("0"==false") is true.)

ingydotnet commented Jan 3, 2011

00:33 <au|irc> mm serendipitous recall :)
Day changed to 02 Jan 2011
17:35 hi
17:35 i got your pull request
17:35 nice catch
17:36 but you patched a generated file.
17:38 take a look at src/Makefile
17:38 most code changes are made under src, iirc
17:41 looks like src/parser/Grammar.pm.skel is your src
17:41 although I'd have no idea how to make your patch from there
17:41 if you could figure out a sane way, it would be most appreciated
17:42 (even an insane way, would get released ;)
17:43 hmmm
17:44 at the worst. you could apply patches from the Makefile
17:45 that's at least a brute force way


audreyt commented Jan 3, 2011

  • Modify the upstream .yp file for generated rules as well. :-)

ingydotnet commented Jan 3, 2011

I'm glad it was that easy.

Now I get to put a release together.

nebulous added a commit that referenced this pull request Jul 11, 2011

Merge pull request #1 from audreyt/master
Patch to make [% UNLESS "0" %]...[% END %] work as in Perl/TT2

@nebulous nebulous merged commit 59ea5fd into ingydotnet:master Jul 11, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment