com.google.caja.plugin.stages
Class OpenTemplateStage.ScopeChecker

java.lang.Object
  extended by com.google.caja.plugin.stages.OpenTemplateStage.ScopeChecker
All Implemented Interfaces:
Visitor
Enclosing class:
OpenTemplateStage

private static class OpenTemplateStage.ScopeChecker
extends java.lang.Object
implements Visitor

Walks a function and compiles a set of all local variables declared in that function.


Field Summary
(package private)  java.util.List<AncestorChain<FunctionConstructor>> innerScopes
           
(package private)  java.util.Set<java.lang.String> variablesInScope
           
 
Constructor Summary
private OpenTemplateStage.ScopeChecker()
           
 
Method Summary
 boolean visit(AncestorChain<?> chain)
          Called on each node reached by the traversal to process that node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

variablesInScope

final java.util.Set<java.lang.String> variablesInScope

innerScopes

final java.util.List<AncestorChain<FunctionConstructor>> innerScopes
Constructor Detail

OpenTemplateStage.ScopeChecker

private OpenTemplateStage.ScopeChecker()
Method Detail

visit

public boolean visit(AncestorChain<?> chain)
Description copied from interface: Visitor
Called on each node reached by the traversal to process that node.

Specified by:
visit in interface Visitor
Parameters:
chain - wraps the node to process, and its ancestors. This is non null, and the node to process is chain.node.
Returns:
whether to continue the traversal. Returning false will end the traversal early.


Copyright (C) 2008 Google Inc.
Licensed under the Apache License, Version 2.0