code: private Token tryAndMatch(boolean terminated, Token.Kind... kinds) {
  		// If the construct being parsed is know to be terminated, then we can
  		// skip all whitespace. Otherwise, we can't skip newlines as these are
  		// significant.
  		int next = terminated ? skipWhiteSpace(index) : skipLineSpace(index);
  
  		if (next < tokens.size()) {
  			Token t = tokens.get(next);
  			for (int i = 0; i != kinds.length; ++i) {
  				if (t.kind == kinds[i]) {
  					index = next + 1;
  					return t;
  				}
  			}
  		}
  		return null;
  	}
docs: Attempt to match a given token(s), whilst ignoring any whitespace in
  between. Note that, in the case it fails to match, then the index will be
  unchanged. This latter point is important, otherwise we could
  accidentally gobble up some important indentation. If more than one kind
  is provided then this will try to match any of them.
  
  @param terminated
  Indicates whether or not this function should be concerned
  with new lines. The terminated flag indicates whether or not
  the current construct being parsed is known to be terminated.
  If so, then we don't need to worry about newlines and can
  greedily consume them (i.e. since we'll eventually run into
  the terminating symbol).
  @param kinds
  
  @return