Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Grammar doesn't recognize PHP closure returning references #343

Closed
alexr00 opened this issue Nov 7, 2018 · 1 comment · Fixed by #368
Closed

Grammar doesn't recognize PHP closure returning references #343

alexr00 opened this issue Nov 7, 2018 · 1 comment · Fixed by #368

Comments

@alexr00
Copy link

alexr00 commented Nov 7, 2018

From @alkihis on November 6, 2018 21:39

Grammar doesn't recognize closure with ampersand before parentheses.

Steps to Reproduce:

  1. Create anonymous function with "&" between "function" keyword and argument list

capture d ecran 2018-11-06 a 22 30 36

capture d ecran 2018-11-06 a 22 35 05

For copying:

<?php
$a = function &() use ($data) {
    $b = 'hello world';
    return $b;
};

$a();
?>

function is a storage.type.function.php and meta.function.closure.php without the ampersand. With the ampersand it is storage.type.php.

Copied from original issue: microsoft/vscode#62680

@alexr00 alexr00 changed the title Broken syntax highlighting for PHP closures returning references Grammar doesn't recognize PHP closure returning references Nov 7, 2018
@rsese rsese added the triaged label Nov 30, 2018
@rsese
Copy link

rsese commented Nov 30, 2018

Thanks! Reproduced on macOS 10.12.6 with 1.35.0-nightly1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants