// assertTokLit expects the given Token and Literal from the Scanner.
// Use "" to ignore the literal result.
assertTokLit expects the given Token and Literal from the Scanner.
Use "" to ignore the literal result.
// assertTokLit expects the given Token and Literal from the Scanner . // Use " " to ignore the literal result .
func assertTokLit(t *testing.T, extok Token, exlit string, s *Scanner) {
	tok, lit := s.scan()
	if tok != extok {
		t.Fatalf("got %v/%v, expected %v/%v.", Tokenname(tok), lit, Tokenname(extok), exlit)
	}
	if exlit != "" && lit != exlit {
		t.Fatalf("got %v/%v, expected %v/%v.", Tokenname(tok), lit, Tokenname(extok), exlit)
	}
}
func assertTokLit ( t * testing . T , extok Token , exlit string , s * Scanner ) { tok , lit := s . scan ( ) if tok != extok { t . Fatalf ( " " , Tokenname ( tok ) , lit , Tokenname ( extok ) , exlit ) } if exlit != " " && lit != exlit { t . Fatalf ( " " , Tokenname ( tok ) , lit , Tokenname ( extok ) , exlit ) } }
assertTokLit expects the given Token and Literal from the Scanner.
assertTokLit expects the given Token and Literal from the Scanner .
// fmt.Printf("got (%v/%v)", Tokenname(tok), lit)