private String expect(Object spec){
  if (!has(spec)) {
    syntaxError(String.format("expected '%s' looking at: ",spec));
    return null;
  }
  return next();
}

private String expect ( Object spec ) { if ( ! has ( spec ) ) { syntaxError ( String . format ( "expected '%s' looking at: " , spec ) ) ; return null ; } return next ( ) ; }
expect the specified token , and move next .
