mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-23 10:02:39 +00:00
Reorganizes the sections, and makes a pass filling in and updating the first sections including: types, functions, user-defined types. The following sections are left for part 2, including names, generics, and interop. Also some smaller updates to, not revisiting the text: `pattern_matching.md`, `control_flow/return.md`, and `lexical_conventions/numeric_literals.md` Co-authored-by: Geoff Romer <gromer@google.com> Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
Lexical conventions
Table of contents
Lexical elements
The first stage of processing a source file is the division of the source file into lexical elements.
A lexical element is one of the following:
- a maximal sequence of whitespace characters
- a word
- a literal:
- TODO: operators, comments, ...
The sequence of lexical elements is formed by repeatedly removing the longest initial sequence of characters that forms a valid lexical element.