Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
magiconair committed May 12, 2021
1 parent 4bca56f commit 1ec58eb
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 30 deletions.
12 changes: 0 additions & 12 deletions lex.go
Expand Up @@ -128,18 +128,6 @@ func (l *lexer) acceptRun(valid string) {
l.backup()
}

// acceptRunUntil consumes a run of runes up to a terminator.
func (l *lexer) acceptRunUntil(term rune) {
for term != l.next() {
}
l.backup()
}

// hasText returns true if the current parsed text is not empty.
func (l *lexer) isNotEmpty() bool {
return l.pos > l.start
}

// lineNumber reports which line we're on, based on the position of
// the previous item returned by nextItem. Doing it this way
// means we don't have to worry about peek double counting.
Expand Down
8 changes: 0 additions & 8 deletions parser.go
Expand Up @@ -59,14 +59,6 @@ func (p *parser) errorf(format string, args ...interface{}) {
panic(fmt.Errorf(format, args...))
}

func (p *parser) expect(expected itemType) (token item) {
token = p.lex.nextItem()
if token.typ != expected {
p.unexpected(token)
}
return token
}

func (p *parser) expectOneOf(expected ...itemType) (token item) {
token = p.lex.nextItem()
for _, v := range expected {
Expand Down
10 changes: 0 additions & 10 deletions properties_test.go
Expand Up @@ -6,7 +6,6 @@ package properties

import (
"bytes"
"flag"
"fmt"
"math"
"os"
Expand All @@ -21,8 +20,6 @@ import (
"github.com/magiconair/properties/assert"
)

var verbose = flag.Bool("verbose", false, "Verbose output")

func init() {
ErrorHandler = PanicHandler
}
Expand Down Expand Up @@ -1006,10 +1003,3 @@ func mustParse(t *testing.T, s string) *Properties {
}
return p
}

// prints to stderr if the -verbose flag was given.
func printf(format string, args ...interface{}) {
if *verbose {
fmt.Fprintf(os.Stderr, format, args...)
}
}

0 comments on commit 1ec58eb

Please sign in to comment.