From f7ddbb8fc499bb98a55e15cb73bc071e13b5a8f3 Mon Sep 17 00:00:00 2001 From: Brandon Dyck Date: Fri, 24 Jul 2026 16:25:29 -0600 Subject: [PATCH] Rename Seq2 to Seq --- TODO.txt | 2 -- internal/bindgen/seq.go.tmpl | 2 +- seq.go | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/TODO.txt b/TODO.txt index fb71952..826e5e1 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,9 +1,7 @@ Think about not requiring so much Pos() when making messages Think about changing "consume" to "commit" -Rename Seq2 to Seq Document Seq Should MakeState be private now that there's Run? What's Megaparsec got that we ain't got? -Add and benchmark naïve Seq chainl whitespace handling diff --git a/internal/bindgen/seq.go.tmpl b/internal/bindgen/seq.go.tmpl index 3c1d298..c58425f 100644 --- a/internal/bindgen/seq.go.tmpl +++ b/internal/bindgen/seq.go.tmpl @@ -1,7 +1,7 @@ {{/* SPDX-License-Identifier: Unlicense */ -}} {{define "func"}}{{if gt . 1 -}} -func Seq{{.}}[In, Out{{range .Count}}, T{{.}}{{end}} any]( +func Seq{{if gt . 2}}{{.}}{{end}}[In, Out{{range .Count}}, T{{.}}{{end}} any]( {{- range .Count}} p{{.}} Parser[In, T{{.}}],{{end}} f func({{range .Count}}{{if ne . 1}}, {{end}}T{{.}}{{end}}) Out, diff --git a/seq.go b/seq.go index 27c8ccd..f63496c 100644 --- a/seq.go +++ b/seq.go @@ -4,7 +4,7 @@ package gigaparsec -func Seq2[In, Out, T, T2 any]( +func Seq[In, Out, T, T2 any]( p Parser[In, T], p2 Parser[In, T2], f func(T, T2) Out,