'-' is a valid key

This commit is contained in:
Don Isaac
2025-03-05 20:09:04 -08:00
parent 46704a9b32
commit 81ee014d04

View File

@@ -136,6 +136,11 @@ pub const TOML = struct {
loc,
);
},
// `-` is a valid identifier
.t_minus => {
try p.lexer.next();
return p.e(E.String{ .data = "-" }, loc);
},
// what we see as a number here could actually be a string
.t_numeric_literal => {
const literal = p.lexer.raw();