diff --git a/lex.go b/lex.go index 367166d..e1e9dd7 100644 --- a/lex.go +++ b/lex.go @@ -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. diff --git a/parser.go b/parser.go index cdc4a80..5810598 100644 --- a/parser.go +++ b/parser.go @@ -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 { diff --git a/properties_test.go b/properties_test.go index 727aac2..47c3e13 100644 --- a/properties_test.go +++ b/properties_test.go @@ -6,7 +6,6 @@ package properties import ( "bytes" - "flag" "fmt" "math" "os" @@ -21,8 +20,6 @@ import ( "github.com/magiconair/properties/assert" ) -var verbose = flag.Bool("verbose", false, "Verbose output") - func init() { ErrorHandler = PanicHandler } @@ -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...) - } -}