Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions template_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"errors"
"fmt"
"io"
"os"
"regexp"
"strconv"
"strings"
Expand Down Expand Up @@ -432,7 +431,6 @@ func parseBlockStart(ctx *lexparse.ParserContext[*tmplNode]) error {
switch token := ctx.Next(); token.Type {
case lexTypeBlockStart:
// OK
fmt.Fprintln(os.Stderr, token.Value)
case lexparse.TokenTypeEOF:
return fmt.Errorf("%w: expected %q", io.ErrUnexpectedEOF, tokenBlockStart)
default:
Expand All @@ -456,7 +454,7 @@ func parseBlockStart(ctx *lexparse.ParserContext[*tmplNode]) error {
case tokenIf:
ctx.PushState(lexparse.ParseStateFn(parseBranch))
case tokenElse, tokenEndif:
// NOTE: parseElse,parseEndif should already be on the stack.
// NOTE: parseElse, parseEndif should already be on the stack.
default:
return lexTokenErr(
fmt.Errorf("%w: expected %q, %q, or %q", errIdentifier, tokenIf, tokenElse, tokenEndif), token)
Expand Down