From 39afd566d0c710e8ad726a6d9ca52da3ae0ad7c1 Mon Sep 17 00:00:00 2001 From: Sasha Melentyev Date: Wed, 11 Dec 2024 12:47:40 +0300 Subject: [PATCH] chore: rm redundant generated comments (#154) Signed-off-by: Sasha Melentyev --- peg.peg.go | 16 ---------------- tree/peg.go | 20 -------------------- 2 files changed, 36 deletions(-) diff --git a/peg.peg.go b/peg.peg.go index fe58771..8222888 100644 --- a/peg.peg.go +++ b/peg.peg.go @@ -679,22 +679,6 @@ func (p *Peg) Init(options ...func(*Peg) error) error { return false } - /*matchChar := func(c byte) bool { - if buffer[position] == c { - position++ - return true - } - return false - }*/ - - /*matchRange := func(lower byte, upper byte) bool { - if c := buffer[position]; c >= lower && c <= upper { - position++ - return true - } - return false - }*/ - _rules = [...]func() bool{ nil, /* 0 Grammar <- <(Header ('p' 'a' 'c' 'k' 'a' 'g' 'e') MustSpacing Identifier Action0 Import* ('t' 'y' 'p' 'e') MustSpacing Identifier Action1 ('P' 'e' 'g') Spacing Action Action2 Definition+ EndOfFile)> */ diff --git a/tree/peg.go b/tree/peg.go index 4ab9fed..3d02637 100644 --- a/tree/peg.go +++ b/tree/peg.go @@ -414,16 +414,6 @@ func (p *{{.StructName}}) Init(options ...func(*{{.StructName}}) error) error { } {{end}} - {{if .HasCharacter}} - /*matchChar := func(c byte) bool { - if buffer[position] == c { - position++ - return true - } - return false - }*/ - {{end}} - {{if .HasString}} matchString := func(s string) bool { i := position @@ -438,16 +428,6 @@ func (p *{{.StructName}}) Init(options ...func(*{{.StructName}}) error) error { } {{end}} - {{if .HasRange}} - /*matchRange := func(lower byte, upper byte) bool { - if c := buffer[position]; c >= lower && c <= upper { - position++ - return true - } - return false - }*/ - {{end}} - _rules = [...]func() bool { nil,`