com.google.caja.parser.quasiliteral
Class StringLiteralQuasiNode

java.lang.Object
  extended by com.google.caja.parser.quasiliteral.QuasiNode
      extended by com.google.caja.parser.quasiliteral.StringLiteralQuasiNode

 class StringLiteralQuasiNode
extends QuasiNode

A quasi-node like "@foo" where matching against a string literal whose content is a valid identifier, will bind the name "foo" to a valid Identifier whose value is the content of the string literal. Substituting into "@foo" will find a Reference or Identifier binding reference for "foo" and produce a string literal containing the identifier name.

Author:
mikesamuel@gmail.com

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.caja.parser.quasiliteral.QuasiNode
QuasiNode.Equivalence
 
Field Summary
private  java.lang.String bindingName
           
 
Fields inherited from class com.google.caja.parser.quasiliteral.QuasiNode
EQUAL_UNESCAPED, SAFE_EQUALS
 
Constructor Summary
StringLiteralQuasiNode(java.lang.String bindingName)
           
 
Method Summary
protected  boolean consumeSpecimens(java.util.List<ParseTreeNode> specimens, java.util.Map<java.lang.String,ParseTreeNode> bindings)
           
protected  boolean createSubstitutes(java.util.List<ParseTreeNode> substitutes, java.util.Map<java.lang.String,ParseTreeNode> bindings)
           
 
Methods inherited from class com.google.caja.parser.quasiliteral.QuasiNode
getChildren, match, putIfDeepEquals, render, safeEquals, substitute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bindingName

private final java.lang.String bindingName
Constructor Detail

StringLiteralQuasiNode

StringLiteralQuasiNode(java.lang.String bindingName)
Method Detail

consumeSpecimens

protected boolean consumeSpecimens(java.util.List<ParseTreeNode> specimens,
                                   java.util.Map<java.lang.String,ParseTreeNode> bindings)
Specified by:
consumeSpecimens in class QuasiNode

createSubstitutes

protected boolean createSubstitutes(java.util.List<ParseTreeNode> substitutes,
                                    java.util.Map<java.lang.String,ParseTreeNode> bindings)
Specified by:
createSubstitutes in class QuasiNode


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