return p.pos + 1;
}
String id = p.getId();
if (id.length() == 0) {
throw new ParseException("Expected identifier '}' parsing local params '" + txt + '"');
}
String val = null;
ch = p.peek();
if (ch != '=') {
// single word... treat {!func} as type=func for easy lookup
val = id;
id = TYPE;
} else {
// saw equals, so read value
p.pos++;
ch = p.peek();
boolean deref = false;
if (ch == '$') {
p.pos++;
ch = p.peek();
deref = true; // dereference whatever value is read by treating it as a variable name
}
if (ch == '\"' || ch == '\'') {
val = p.getQuotedString();
} else {
// read unquoted literal ended by whitespace or '}'
// there is no escaping.
int valStart = p.pos;
for (; ;) {
if (p.pos >= p.end) {
throw new ParseException("Missing end to unquoted value starting at " + valStart + " str='" + txt + "'");
}
char c = p.val.charAt(p.pos);
if (c == LOCALPARAM_END || Character.isWhitespace(c)) {
val = p.val.substring(valStart, p.pos);
break;