Examples of ScopeView


Examples of com.github.sommeri.less4j.core.compiler.scopes.view.ScopeView

    return createChildScopeView(underlyingChild, null, parent)
  }
 
  public static ScopeView createChildScopeView(IScope underlying, ScopeView publicParent, IScope joinToParentTree) {
    ScopesTreeView scopesTree = new ScopesTreeView(underlying.getSurroundingScopes(), joinToParentTree, publicParent, null);
    ScopeView result = new ScopeView(underlying, scopesTree);
    scopesTree.setScope(result);
    return result;
  }
View Full Code Here

Examples of com.github.sommeri.less4j.core.compiler.scopes.view.ScopeView

    return result;
  }
 
  public static ScopeView createParentScopeView(IScope underlying, ScopeView fakeChild, IScope joinToParentTree) {
    ScopesTreeView scopesTree = new ScopesTreeView(underlying.getSurroundingScopes(), joinToParentTree, null, fakeChild);
    ScopeView result = new ScopeView(underlying, scopesTree);
    scopesTree.setScope(result);

    return result;
  }
View Full Code Here

Examples of com.github.sommeri.less4j.core.compiler.scopes.view.ScopeView

    return result;
  }

  public static ScopeView createScopeViewJoint(IScope underlyingParent, IScope additionalChild) {
    ScopesTreeView scopesTree = new ScopesTreeViewJoint(underlyingParent.getSurroundingScopes(), null, additionalChild);
    ScopeView result = new ScopeView(underlyingParent, scopesTree);
    scopesTree.setScope(result);
   
    return result;
  }
View Full Code Here

Examples of com.github.sommeri.less4j.core.compiler.scopes.view.ScopeView

  public ScopeView joinIfIndependentAndPreserveContent(IScope callerScope, IScope bodyScope) {
    // locally defined mixin does not require any other action
    boolean isLocalImport = bodyScope.seesLocalDataOf(callerScope);

    ScopeView result = null;
    if (isLocalImport) {
      // we need to copy the whole tree, because this runs inside referenced mixin scope
      // snapshot and imported mixin needs to remember the scope as it is now
      result = ScopeFactory.createJoinedScopesView(null, bodyScope);
    } else {
      // since this is non-local import, we need to join reference scope and imported mixins scope
      // imported mixin needs to have access to variables defined in caller
      result = ScopeFactory.createJoinedScopesView(callerScope, bodyScope);
    }
    result.saveLocalDataForTheWholeWayUp();
    return result;
  }
View Full Code Here

Examples of com.github.sommeri.less4j.core.compiler.scopes.view.ScopeView

  public List<FullMixinDefinition> mixinsToImport(IScope callerScope, IScope calleeScope, List<FullMixinDefinition> unmodifiedMixinsToImport) {
    List<FullMixinDefinition> result = new ArrayList<FullMixinDefinition>();
    for (FullMixinDefinition mixinToImport : unmodifiedMixinsToImport) {
      boolean isLocalImport = mixinToImport.getScope().seesLocalDataOf(callerScope);
      ScopeView newScope = null;
      if (isLocalImport) {
        // we need to copy the whole tree, because this runs inside referenced mixin scope
        // snapshot and imported mixin needs to remember the scope as it is now
        newScope = ScopeFactory.createJoinedScopesView(null, mixinToImport.getScope());
        newScope.saveLocalDataForTheWholeWayUp();
      } else {
        // since this is non-local import, we need to join reference scope and imported mixins scope
        // imported mixin needs to have access to variables defined in caller
        newScope = ScopeFactory.createJoinedScopesView(calleeScope, mixinToImport.getScope());
        newScope.saveLocalDataForTheWholeWayUp();
      }

      result.add(new FullMixinDefinition(mixinToImport.getMixin(), newScope));
    }
    return result;
View Full Code Here

Examples of org.apache.flex.compiler.internal.scopes.ScopeView

        }
        else if (containingScope instanceof ScopeView)
        {
            // Check if the property is a member of the ViewScope.  If so, then
            // return the containing class register
            ScopeView scopeView = (ScopeView)containingScope;
            final String baseName = name.getBaseName();
            IDefinition propertyDef = scopeView.getPropertyFromDef(getProject(), scopeView.getDefinition(), baseName, false);

            if (propertyDef != null)
                result.addInstruction(getContainingClass());
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.