commit | e803ab87824c8837431ffe00747f5d588ff50361 | [log] [tgz] |
---|---|---|
author | Marcel van Lohuizen <mpvl@golang.org> | Fri Feb 07 14:56:48 2020 +0100 |
committer | Marcel van Lohuizen <mpvl@golang.org> | Fri Feb 07 14:26:36 2020 +0000 |
tree | 3c5dbfb87aafe6e8147fbb867c48bd8e5c2eabd7 | |
parent | b236d4ad6e42511588ad3b81f46ba792015d9a94 [diff] [blame] |
cue/ast: add NewLit helper Change-Id: I36810984e1b6e8ad164263510ff8fc5c31bbb095 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/4903 Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/encoding/protobuf/parse.go b/encoding/protobuf/parse.go index 2cca457..c5c8c14 100644 --- a/encoding/protobuf/parse.go +++ b/encoding/protobuf/parse.go
@@ -630,7 +630,7 @@ // Add enum value to map f := &ast.Field{ Label: p.stringLit(y.Position, y.Name), - Value: &ast.BasicLit{Value: strconv.Itoa(y.Integer)}, + Value: ast.NewLit(token.INT, strconv.Itoa(y.Integer)), } valueMap.Elts = append(valueMap.Elts, f)