rust-lang / rust-lang/fls

Token `StringContinuation` does not specify whitespace-consumption behavior

Open
#637 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
reStructuredText
Stars
497
Forks
41
Avg merge
3h 52m
Merged PRs (30d)
4

Description

The whitespace-consumption behavior of StringContinuation (§2.4.6.1:2) is not defined. This behavior is defined in the Rust reference. A naïve implementation of StringContinuation based solely off of the FLS will incorrectly parse (note the whitespace):

    "Multi\
    line"

as equivalent to "Multi line", which is incorrect.

Instead, StringContinuation can be more accurately described as:

StringContinuation is the character sequence 0x5C 0x0A (reverse solidus, new line) followed by a whitespace string.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open §2.4.6.1:2 in the FLS and compare the StringContinuation wording with the linked Rust reference. Clarify the specification using the stated character sequence, then verify that the multiline example is no longer interpreted as containing the indentation whitespace.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.