Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Commit

Permalink
internal: store Body in Attr type
Browse files Browse the repository at this point in the history
Change-Id: Ie0bc6d19647a9c940fd43025d6c9a9636792fb2f
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/9187
Reviewed-by: CUE cueckoo <[email protected]>
Reviewed-by: Paul Jolly <[email protected]>
  • Loading branch information
mpvl committed Mar 29, 2021
1 parent ccca558 commit e3e11e3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/attrs.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (

// Attr holds positional information for a single Attr.
type Attr struct {
Body string
Fields []keyValue
Err error
}
Expand Down Expand Up @@ -110,6 +111,7 @@ func (a *Attr) Lookup(pos int, key string) (val string, found bool, err error) {
}

func ParseAttrBody(pos token.Pos, s string) (a Attr) {
a.Body = s
i := 0
for {
i += skipSpace(s[i:])
Expand Down

0 comments on commit e3e11e3

Please sign in to comment.