use of com.google.auto.value.processor.escapevelocity.ReferenceNode.MemberReferenceNode in project auto by google.
the class Parser method parseReferenceMember.
/**
* Parses a reference member, which is either a property reference like {@code $x.y} or a method
* call like {@code $x.y($z)}.
* <pre>{@code
* <reference-member> -> .<id><reference-method-or-property><reference-suffix>
* <reference-method-or-property> -> <id> |
* <id> ( <method-parameter-list> )
* }</pre>
*
* @param lhs the reference node representing what appears to the left of the dot, like the
* {@code $x} in {@code $x.foo} or {@code $x.foo()}.
*/
private ReferenceNode parseReferenceMember(ReferenceNode lhs) throws IOException {
assert c == '.';
next();
String id = parseId("Member");
ReferenceNode reference;
if (c == '(') {
reference = parseReferenceMethodParams(lhs, id);
} else {
reference = new MemberReferenceNode(lhs, id);
}
return parseReferenceSuffix(reference);
}
Aggregations