Re: Creating an experimental syntax

From: Date: Sat, 17 Oct 2009 14:22:39 +0000
Subject: Re: Creating an experimental syntax
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-45836@lists.php.net to get a copy of this message
Dear Internals So I'm making good progress and found out that making simple syntax changes is quite easy. What I currently got working can be seen here: http://code.google.com/p/php-alternative-syntax/source/browse/trunk/scripts/kitchensink.php. However, making functionality changes still baffles me. I changed the "return" keyword to "<-", and I would like to automatically add a return on the last line of a function. So that the following PHP code: <?php function foo() { $x = 2; $x * 2; } ?> would return an int with a value of 4. How should I attack this problem? Thx a lot! Rune Kaagaard Denmark

« previous php.internals (#45836) next »