Package com.google.template.soy.sharedpasses.FindIndirectParamsVisitor

Examples of com.google.template.soy.sharedpasses.FindIndirectParamsVisitor.IndirectParamsInfo


    Set<String> dataKeys = Sets.newHashSet()// data keys referenced in this template
    getDataKeysInExprVisitor = new GetDataKeysInExprVisitor(dataKeys);

    visitChildren(node);

    IndirectParamsInfo ipi = (new FindIndirectParamsVisitor(templateRegistry)).exec(node);

    List<String> unusedParams = Lists.newArrayList();
    for (SoyDocParam param : node.getSoyDocParams()) {
      if (dataKeys.contains(param.key)) {
        // Good: Declared in SoyDoc and referenced in template. We remove these from dataKeys so
View Full Code Here


    // Direct params.
    for (SoyDocParam param : node.getSoyDocParams()) {
      transitiveParamMap.put(param.key, param);
    }
    // Indirect params.
    IndirectParamsInfo indirectParamsInfo =
        (new FindIndirectParamsVisitor(templateRegistry)).exec(node);
    for (SoyDocParam param : indirectParamsInfo.indirectParams.values()) {
      SoyDocParam existingParam = transitiveParamMap.get(param.key);
      if (existingParam == null) {
        // Note: We don't list the SoyDoc description for indirect params.
View Full Code Here

    mayHaveIndirectParamsInExternalCalls = false;
    mayHaveIndirectParamsInExternalDelCalls = false;

    visit(node);

    return new IndirectParamsInfo(
        ImmutableSortedMap.copyOf(indirectParams), paramKeyToCalleesMultimap,
        mayHaveIndirectParamsInExternalCalls, mayHaveIndirectParamsInExternalDelCalls);
  }
View Full Code Here

    TemplateNode b1 = b.getChild(1);
    //TemplateNode b2 = b.getChild(2);
    TemplateNode b3 = b.getChild(3);
    TemplateNode b4 = b.getChild(4);

    IndirectParamsInfo ipi = (new FindIndirectParamsVisitor(null)).exec(a0);
    assertEquals(false, ipi.mayHaveIndirectParamsInExternalCalls);
    assertEquals(false, ipi.mayHaveIndirectParamsInExternalDelCalls);

    Map<String, SoyDocParam> ipMap = ipi.indirectParams;
    assertEquals(6, ipMap.size());
View Full Code Here

TOP

Related Classes of com.google.template.soy.sharedpasses.FindIndirectParamsVisitor.IndirectParamsInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.