docs: private static int[] findSubVariable(String eval) {
  		int[] result = {-1, -1};
  
  		int matchStart;
  		int leftBrace;
  
  		// scanning for a brace first because it's less frequent than $
  		// that can occur in nested class names
  		//
  		match_loop:
  		for (matchStart = 1, leftBrace = eval.indexOf('{', matchStart);
  			// minimum left brace position (follows '$')
  			 leftBrace > 0
  				     // right brace of a smallest valid expression "${c}"
  				     && leftBrace + "{c".length() < eval.length();
  			 leftBrace = eval.indexOf('{', matchStart)) {
  			int matchedLen = 0;
  			if (eval.charAt(leftBrace - 1) == '$') {
  				int subStart = leftBrace + 1; // after '{'
  				for (int i = subStart; i < eval.length(); i++) {
  					switch (eval.charAt(i)) {
  						case '}':
  							if (matchedLen > 0) { // match
  								result[SUB_START_IDX] = subStart;
  								result[SUB_END_IDX] = subStart + matchedLen;
  								break match_loop;
  							}
  							// fall through to skip 1 char
  						case ' ':
  						case '$':
  							matchStart = i + 1;
  							continue match_loop;
  						default:
  							matchedLen++;
  					}
  				}
  				// scanned from "${"  to the end of eval, and no reset via ' ', '$':
  				//    no match!
  				break match_loop;
  			} else {
  				// not a start of a variable
  				//
  				matchStart = leftBrace + 1;
  			}
  		}
  		return result;
  	}