Files
carbon-lang/explorer/testdata/basic_syntax
josh11bandJon Meow 0a93289706 Add support for Self and impl as (#1194)
- Makes `Self` a keyword
- Inside `class Foo { `... `}`, `Self` means `Foo`
- Inside `class Foo(T:! Type, U:! Type) {` ...` }`, `Self` means `Foo(T, U)`
- `impl as Bar` means `impl Self as Bar`
- Inside `external impl Foo as Bar {`...`}`, not in a scope already defining `Self`, `Self` means `Foo`

Implemented by introducing a new kind of declaration, a `SelfDeclaration`, that is automatically added to class and impl declarations.

Co-authored-by: Jon Meow <jperkins@google.com>
2022-05-05 18:23:13 -07:00
..