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

贡献者指南