Bug 370515 - parser thinks PHP7's IIFE syntax is a syntax error. ( immediately invoked function expression )
Summary: parser thinks PHP7's IIFE syntax is a syntax error. ( immediately invoked fun...
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: PHP (show other bugs)
Version: 5.0.1
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-12 00:00 UTC by Hans Henrik Bergan
Modified: 2017-03-07 08:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans Henrik Bergan 2016-10-12 00:00:01 UTC
as the summary says.
example script:
<?php (function(){})(); ?>

that is valid syntax as of PHP7. errors reported by parser:

Expected symbol "semicolonOrCloseTag" (current token: "(" [1103] at 0:21 - 0:21)

Expected symbol "statement" (current token: "(" [1103] at 0:21 - 0:21)

Expected symbol "topStatement" (current token: "(" [1103] at 0:21 - 0:21)

Expected symbol "outerTopStatement" (current token: "(" [1103] at 0:21 - 0:21)

Expected symbol "start" (current token: "(" [1103] at 0:21 - 0:21)
Comment 1 Milian Wolff 2017-02-02 11:34:41 UTC
Git commit 2bcdaa11f4d37b14cc0e016df9017224ca03f8d4 by Milian Wolff, on behalf of Shashwat Dixit.
Committed on 02/02/2017 at 11:22.
Pushed by mwolff into branch 'master'.

Php7 IIFE syntax parsing

Added parsing support for php7 iife syntax.

Reviewers: kfunk, #kdevelop, mwolff

Reviewed By: #kdevelop, mwolff

Subscribers: kdevelop-devel

Tags: #kdevelop
Differential Revision: https://phabricator.kde.org/D4391

M  +31   -0    duchain/tests/duchain.cpp
M  +2    -0    duchain/tests/duchain.h
M  +6    -2    parser/php.g

https://commits.kde.org/kdev-php/2bcdaa11f4d37b14cc0e016df9017224ca03f8d4
Comment 2 Kevin Funk 2017-03-07 08:47:12 UTC
Git commit deeba5b7af324456278cd78f469c4091abe8bda2 by Kevin Funk, on behalf of Shashwat Dixit.
Committed on 07/03/2017 at 08:41.
Pushed by kfunk into branch '5.1'.

Php7 IIFE syntax parsing

Added parsing support for php7 iife syntax.

Reviewers: kfunk, #kdevelop, mwolff

Reviewed By: #kdevelop, mwolff

Subscribers: kdevelop-devel

Tags: #kdevelop
Differential Revision: https://phabricator.kde.org/D4391

(cherry picked from commit 2bcdaa11f4d37b14cc0e016df9017224ca03f8d4)

M  +31   -0    duchain/tests/duchain.cpp
M  +2    -0    duchain/tests/duchain.h
M  +6    -2    parser/php.g

https://commits.kde.org/kdev-php/deeba5b7af324456278cd78f469c4091abe8bda2