private void parameter(ParameterToken token) { ComponentPageElement element = activeElementStack.peek(); String name = token.getName(); BlockImpl block = new BlockImpl( token.getLocation(), String.format("Parmeter %s of %s", name, element.getCompleteId())); Binding binding = new LiteralBinding("block parameter " + name, block, token.getLocation()); // TODO: Check that the t:parameter doesn't appear outside of an embedded component. element.bindParameter(name, binding); setupBlock(block); }
/** * This method returns list of FunctionCalls that are owners of a given FunctionCall * * @param fc * @return */ private List<FunctionCall> getFunctionCallOwners(FunctionCall fc) { List<FunctionCall> ownerFcs = new ArrayList<>(); for (ParameterToken pt : fc.owners) { if (pt instanceof FunctionCallToken) { ownerFcs.add(((FunctionCallToken) pt).functionCall); } else { switch (pt.toString()) { case "::": case "->": case ".": ParsedObjectManager.getInstance().currentFunc.addOperator(pt.toString()); break; default: // Add owner to halstead calculations } } } return ownerFcs; }