public EasySource getInnerText(char open, char close) {
		StringBuffer code = new StringBuffer();
		int brace_counter = 0;
		while (true) {
			if (pos >= src.length) {
				return null;
			}
			char c = src[pos];
			if (c == open) { // TODO: what about open and close inside strings ?
				brace_counter++;
				// code.appendInPlace(parse(rs, hook).src);
				// code.appendInPlace(close);
			}
			if (c == close) //|| src[pos] == close)
			{
				if (brace_counter > 0)
					brace_counter--;
				else {
					pos++;
					break;
				}
			}
			code.append(c); // TODO: optimize
			pos++;
		}
		return new EasySource(code.toString().toCharArray());
	}
public EasySource getInnerText(char open, char close) {
		StringBuffer code = new StringBuffer();
		int brace_counter = 0;
		while (true) {
			if (pos >= src.length) {
				return null;
			}
			char c = src[pos];
			if (c == open) {
				brace_counter++;
			
			
			}
			if (c == close)
			{
				if (brace_counter > 0)
					brace_counter--;
				else {
					pos++;
					break;
				}
			}
			code.append(c);
			pos++;
		}
		return new EasySource(code.toString().toCharArray());
	}
public easysource getinnertext(char open, char close) { stringbuffer code = new stringbuffer(); int brace_counter = 0; while (true) { if (pos >= src.length) { return null; } char c = src[pos]; if (c == open) { brace_counter++; } if (c == close) { if (brace_counter > 0) brace_counter--; else { pos++; break; } } code.append(c); pos++; } return new easysource(code.tostring().tochararray()); }