Review Request 111559: Add support for PHP 5.5's string literal dereferencing.

Heinz Wiesinger pprkut at liwjatan.at
Thu Jul 18 09:28:26 UTC 2013



> On July 18, 2013, 9:22 a.m., Milian Wolff wrote:
> > parser/php.g, line 800
> > <http://git.reviewboard.kde.org/r/111559/diff/1/?file=171319#file171319line800>
> >
> >     Here and below: only one or none is allowed, not multiple string indices - or?
> >     
> >     Please fix this, then this is ready to go. Thanks!

Actually it works. It's pretty pointless to do, but it's correct nonetheless.

echo 'string'[0][0];

would output the string 's'. The first index returns 's', which is basically again a string you could dereference. And so forth...


- Heinz


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111559/#review36099
-----------------------------------------------------------


On July 18, 2013, 9:14 a.m., Heinz Wiesinger wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111559/
> -----------------------------------------------------------
> 
> (Updated July 18, 2013, 9:14 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Description
> -------
> 
> Add support for PHP 5.5's string literal dereferencing.
> 
> I opted for creating a new stringIndexIdentifier token as [] is not supported for strings.
> 
> 
> Diffs
> -----
> 
>   duchain/tests/expressionparser.h a749e973d11505d94abf1ea43d45513ca22d5244 
>   duchain/tests/expressionparser.cpp 72970fce85153fdb1baf97163c306a0e6c312d6c 
>   parser/php.g 55b7b64de919137b03331569381dee45cdb21fb2 
> 
> Diff: http://git.reviewboard.kde.org/r/111559/diff/
> 
> 
> Testing
> -------
> 
> Unit tests, checked example code
> 
> 
> Thanks,
> 
> Heinz Wiesinger
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20130718/76e9b24c/attachment.html>


More information about the KDevelop-devel mailing list