// TODO: what about open and close inside strings ?
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());
	}
}
char c = src[pos];
if (c == open) { // TODO: what about open and close inside strings ?
brace_counter++;
// code.appendInPlace(parse(rs, hook).src);
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++;
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());
}