aboutsummaryrefslogtreecommitdiffstats
path: root/sysparser/parser.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2016-10-31 15:15:13 -0600
committerDmitry Vyukov <dvyukov@google.com>2016-11-11 14:33:37 -0800
commit588a542b2a23ba477031bf20b4c46b0f40a04b7d (patch)
tree9e517866f45cdb903505e72c0fcbf821c0b00dcd /sysparser/parser.go
parent5ed6283b64f91c8aa036122b18974aabed4c5249 (diff)
sys: add string flags
Allow to define string flags in txt descriptions. E.g.: filesystem = "ext2", "ext3", "ext4" and then use it in string type: ptr[in, string[filesystem]]
Diffstat (limited to 'sysparser/parser.go')
-rw-r--r--sysparser/parser.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/sysparser/parser.go b/sysparser/parser.go
index 590847b0e..d5021eee6 100644
--- a/sysparser/parser.go
+++ b/sysparser/parser.go
@@ -70,11 +70,10 @@ func (p *parser) Ident() string {
start, end := p.i, 0
if p.Char() == '"' {
p.Parse('"')
- start++
for p.Char() != '"' {
p.i++
}
- end = p.i
+ end = p.i + 1
p.Parse('"')
} else {
for p.i < len(p.s) &&