aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/ast/parser.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/ast/parser.go')
-rw-r--r--pkg/ast/parser.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/ast/parser.go b/pkg/ast/parser.go
index bb08a0b7e..c87d43f5e 100644
--- a/pkg/ast/parser.go
+++ b/pkg/ast/parser.go
@@ -497,7 +497,7 @@ func (p *parser) parseIdent() *Ident {
}
func (p *parser) parseString() *String {
- p.expect(tokString, tokStringHex)
+ p.expect(tokString, tokStringHex, tokIdent)
str := &String{
Pos: p.pos,
Value: p.lit,
@@ -513,6 +513,8 @@ func strTokToFmt(tok token) StrFmt {
return StrFmtRaw
case tokStringHex:
return StrFmtHex
+ case tokIdent:
+ return StrFmtIdent
default:
panic("bad string token")
}