Microsoft/monaco-editor

[Feature Request] Add suuport for php8 attributes

Open

#2,898 建立於 2022年1月18日

在 GitHub 查看
 (2 留言) (2 反應) (0 負責人)JavaScript (1,283 fork)batch import
feature-requestgrammarshelp wanted

倉庫指標

Star
 (14,836 star)
PR 合併指標
 (平均合併 6小時 26分鐘) (30 天內合併 15 個 PR)

描述

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

貢獻者指南