aboutsummaryrefslogtreecommitdiffstats
path: root/internal/revision/parser.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/revision/parser.go')
-rw-r--r--internal/revision/parser.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/revision/parser.go b/internal/revision/parser.go
index 8facf17..8a2a719 100644
--- a/internal/revision/parser.go
+++ b/internal/revision/parser.go
@@ -322,6 +322,8 @@ func (p *Parser) parseAt() (Revisioner, error) {
}
return AtDate{t}, nil
+ case tok == eof:
+ return nil, &ErrInvalidRevision{s: `missing "}" in @{<data>} structure`}
default:
date += lit
}
@@ -424,6 +426,8 @@ func (p *Parser) parseCaretBraces() (Revisioner, error) {
p.unscan()
case tok != slash && start:
return nil, &ErrInvalidRevision{fmt.Sprintf(`"%s" is not a valid revision suffix brace component`, lit)}
+ case tok == eof:
+ return nil, &ErrInvalidRevision{s: `missing "}" in ^{<data>} structure`}
case tok != cbrace:
p.unscan()
re += lit