Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP: Complex Curly Syntax, and Anonymous classes #1443

Open
jacobseated opened this issue May 6, 2020 · 0 comments
Open

PHP: Complex Curly Syntax, and Anonymous classes #1443

jacobseated opened this issue May 6, 2020 · 0 comments

Comments

@jacobseated
Copy link

jacobseated commented May 6, 2020

Certain things are not supported by the PHP lexer, specifically complex curly syntax seem to result in red boxes around the doller sign ($):

${'whatever'} = '';
becomes:
[$]{'whatever'} = '';

Also, creating an anonymous class without parentheses will make Pygments choke:

$containerObject = new class {
  public $something;
} 

I tried modifying the PHP lexer and testing in the command line, unfortunately, it is still a bit too complex for me to fix. Luckily, I found I could just include a pair of parentheses after the class and it would be fine.

$containerObject = new class() {
  public $something;
} 

The complex curly issue is minor, and does not seem to make Pygments choke up completely.

@jacobseated jacobseated changed the title PHP: Complex Curly Syntax and Anonymous classes PHP: Complex Curly Syntax, and Anonymous classes May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant