Microsoft/monaco-editor

[Feature Request] Add suuport for php8 attributes

Open

#2,898 opened on Jan 18, 2022

View on GitHub
 (2 comments) (2 reactions) (0 assignees)JavaScript (1,283 forks)batch import
feature-requestgrammarshelp wanted

Repository metrics

Stars
 (14,836 stars)
PR merge metrics
 (Avg merge 6h 26m) (15 merged PRs in 30d)

Description

Context

  • This issue is not a bug report. (please use a different template for reporting a bug)
  • This issue is not a duplicate of an existing issue. (please use the search to find existing issues)

Description

In the php 8 there is a new mechanism, which is attributes. However, in editor, they look like comments. E.g.

#[Attr(...), Attr(...)]
private int $a;

image

In single lines it can be skipped, but attributes can be multilines, what makes it totally wrongly colored. E.g.

#[ArrayShape([
	'id' => 'int',
	'month' => 'int',
	'day' => 'int',
	'usual' => 'int'
])]

image

Contributor guide