mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-22 20:22:39 +00:00
We've talked about adding the title to the filename several times over the years and it seems really valuable. This requires us to compute a "slug" for the title spelling that can be part of the filename. Beyond that, we crossed 7000 recently, and so it seems likely that we will need to add digits sooner rather than later here, so this goes ahead and moves us to 6 digits so we don't have to adjust again for a reasonable length of time. To implement this and ensure we can sustain it going forward this adds a tool to our pre-commit that validates (and corrects if needed) the filename. In order to update everything and keep links working, there are a _lot_ of changes, but the most interesting for direct review are in `proposals/scripts`. Assisted-by: Antigravity with Gemini --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>
1.5 KiB
1.5 KiB
Whitespace
Table of contents
Overview
The exact lexical form of Carbon whitespace has not yet been settled. However, Carbon will follow lexical conventions for whitespace based on Unicode Annex #31. TODO: Update this once the precise rules are decided; see the Unicode source files proposal.
Unicode Annex #31 suggests selecting whitespace characters based on the
characters with Unicode property Pattern_White_Space, which is currently these
11 characters:
- Horizontal whitespace:
- U+0009 CHARACTER TABULATION (horizontal tab)
- U+0020 SPACE
- U+200E LEFT-TO-RIGHT MARK
- U+200F RIGHT-TO-LEFT MARK
- Vertical whitespace:
- U+000A LINE FEED (traditional newline)
- U+000B LINE TABULATION (vertical tab)
- U+000C FORM FEED (page break)
- U+000D CARRIAGE RETURN
- U+0085 NEXT LINE (Unicode newline)
- U+2028 LINE SEPARATOR
- U+2029 PARAGRAPH SEPARATOR
The quantity and kind of whitespace separating tokens is ignored except where otherwise specified.
References
- Proposal #142: Unicode source files