Summary
Grayscale structs support default field values (STANDARD.md §3.2.3). The LSP symbol scanner does not currently handle the = expr suffix on struct fields.
Example
const Config struct {
host string = "localhost"
port int = 8080
verbose bool = false
}
const Point struct {
x, y int = 0
z int = 1
}
When a struct is created with new() or a struct literal that omits a field, the default value is used instead of zero-initialization. #json structs cannot have default field values.
Scope
- Update the symbol scanner in
symbols.ts to handle field type = value syntax when parsing struct fields
- Ensure hover/completion for struct fields includes the default value when present
Summary
Grayscale structs support default field values (STANDARD.md §3.2.3). The LSP symbol scanner does not currently handle the
= exprsuffix on struct fields.Example
When a struct is created with
new()or a struct literal that omits a field, the default value is used instead of zero-initialization.#jsonstructs cannot have default field values.Scope
symbols.tsto handlefield type = valuesyntax when parsing struct fields