aboutsummaryrefslogtreecommitdiff
path: root/spec/parser.go
diff options
context:
space:
mode:
Diffstat (limited to 'spec/parser.go')
-rw-r--r--spec/parser.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/parser.go b/spec/parser.go
index 9778521..71ee50b 100644
--- a/spec/parser.go
+++ b/spec/parser.go
@@ -36,9 +36,10 @@ type AlternativeNode struct {
}
type ElementNode struct {
- ID string
- Pattern string
- Pos Position
+ ID string
+ Pattern string
+ Literally bool
+ Pos Position
}
type DirectiveNode struct {
@@ -407,8 +408,9 @@ func (p *parser) parseElement() *ElementNode {
}
case p.consume(tokenKindStringLiteral):
return &ElementNode{
- Pattern: mlspec.EscapePattern(p.lastTok.text),
- Pos: p.lastTok.pos,
+ Pattern: p.lastTok.text,
+ Literally: true,
+ Pos: p.lastTok.pos,
}
}
return nil