Dict literal now accepts expressions as keys. Key values are computed at evalutetion time and still must be integer or string

This commit is contained in:
2026-05-20 05:14:22 +02:00
parent 1aea1c14d2
commit 1055569dd6
6 changed files with 60 additions and 46 deletions
+4
View File
@@ -136,3 +136,7 @@ func (tk *Token) ErrorExpectedGotStringWithPrefix(prefix, symbol, got string) (e
err = fmt.Errorf("[%d:%d] %s %s, got `%s`", tk.row, tk.col, prefix, symbol, got)
return
}
func (tk *Token) ErrorExpectedOneOfGot(expected ...Symbol) (err error) {
return tk.ErrorExpectedGotStringWithPrefix("expected one of ", SymListToString(expected, true), SymToString(tk.Sym))
}