Commit Graph
4 Commits
Author SHA1 Message Date
Richard Smith fe28dd9a33 [toolchain] Parsing support for struct literals, following #561 / #653. (#699)
This supports both struct type literals, `{.x: i32, .y: i32}`, and struct
value literals, `{.x = 3, .y = 4}`. The degenerate case of `{}` is
treated as a struct value literal, with the expectation that an empty
struct value has the same type/value duality as an empty tuple value.
2021-08-27 18:18:33 -07:00
Richard Smith b1993a6cd0 [toolchain] Parsing support for tuple literal syntax. (#694)
For now, we permit non-empty tuples to have trailing commas, and require
a trailing comma if there's exactly one list element. The exact rule
here has not yet been decided.
2021-08-02 16:18:18 -07:00
Richard Smith 61b30b1243 [toolchain] Parse variables and parameters as 'name: Type'. (#574)
Factor out code for pattern parsing, that only recognizes this form for
now, and uniformly form a 'PatternBinding' parse node for this, for
both variables and patterns.
2021-06-14 14:28:45 -07:00
Chandler Carruth 8f8ab23a77 Move the toolchain into a top-level directory. (#567)
This should clean up our top level directory and the build patterns.

No non-mechanical edits here. Just injecting `toolchain/` and
`TOOLCHAIN_` and then running formatting tools.
2021-06-08 03:01:37 -07:00