From cc3fbeba195328c533f57bd04ac0d0221fc13063 Mon Sep 17 00:00:00 2001 From: xushiwei Date: Fri, 22 Nov 2024 23:08:40 +0800 Subject: [PATCH] mini spec: Predeclared identifiers --- doc/spec-mini.md | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/doc/spec-mini.md b/doc/spec-mini.md index c09b2edf8..d215cccfa 100644 --- a/doc/spec-mini.md +++ b/doc/spec-mini.md @@ -1773,8 +1773,61 @@ The _blank identifier_ is represented by the underscore character `_`. It serves ### Predeclared identifiers +The following identifiers are implicitly declared in the [universe block](): + +```go +Types: + any bigint bigrat bool byte comparable + complex64 complex128 error float32 float64 + int int8 int16 int32 int64 rune string + uint uint8 uint16 uint32 uint64 uintptr + +Constants: + true false iota + +Zero value: + nil + +Functions: + append cap clear close complex copy delete echo imag len + make max min new panic print printf println real recover // TODO(xsw): more +``` + +### Exported identifiers + +TODO + +### Uniqueness of identifiers + +TODO + +### Constant declarations + +TODO + +### Iota + +TODO + +### Type declarations + +TODO + +#### Alias declarations + +TODO + +#### Type definitions + +TODO + +### Variable declarations + TODO +### Short variable declarations + +TODO ### Function declarations