Tracking Issue for frontmatter (original) (raw)

This is a tracking issue for the RFC "frontmatter" (rust-lang/rfcs#3503).
The feature gate for the issue is #![feature(frontmatter)].

About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.

Steps

Non-blocking

Test coverage prior to stabilization

In the following, the RFC text in its accepted form will be referred to as the "accepted text".

Unresolved Questions

Implementation history

Initial implementations

(Significant) changes since the RFC was accepted

Frontmatter opener vs infostring starting with - character grammar ambiguity

The accepted text has a grammar ambiguity in the case where the infostring starts with a -.

Remedy: we can require the infostring to begin with Unicode XID_Start, then permit subsequently characters in the set { XID_Continue, . }. I.e. (illustrative)

See discussions at #140035 (comment).

Illustrative grammar

#140035 (comment) (with start and end dashes >= 3 - characters and must match in - count):

frontmatter_start = dashes , { whitespace } * , infostring , { whitespace } * , '\n' ; frontmatter_end = dashes , { whitespace } * , '\n' ; infostring = XID_Start , { (XID_Continue | '.') } * ; dashes = "---" , { '-' } * ;