edu.rice.cs.drjava.model.definitions.reducedmodel
Class InsideDoubleQuote

java.lang.Object
  extended by edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedModelState
      extended by edu.rice.cs.drjava.model.definitions.reducedmodel.InsideDoubleQuote

public class InsideDoubleQuote
extends ReducedModelState

The shadowing state that corresponds to being inside a double-quoted string.

Version:
$Id: InsideDoubleQuote.java 5175 2010-01-20 08:46:32Z mgricken $

Field Summary
static InsideDoubleQuote ONLY
          Singleton instance
 
Constructor Summary
private InsideDoubleQuote()
          Singleton constructor
 
Method Summary
(package private)  ReducedModelState update(TokenList.Iterator copyCursor)
          Walk function for when inside a quoted string.
 
Methods inherited from class edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedModelState
_combineCurrentAndNextIfEscape, _combineCurrentAndNextIfFind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ONLY

public static final InsideDoubleQuote ONLY
Singleton instance

Constructor Detail

InsideDoubleQuote

private InsideDoubleQuote()
Singleton constructor

Method Detail

update

ReducedModelState update(TokenList.Iterator copyCursor)
Walk function for when inside a quoted string. Mutually recursive with other walk functions.
  1. If we've reached the end of the list, return.
  2. If we find //, /* or * /, split them into two separate braces. The cursor will be on the first of the two new braces.
  3. If current brace = \n or ", mark current brace FREE, next(), and go to updateFree.
    Else, mark current brace as INSIDE_DOUBLE_QUOTE, go to next brace, recur.

Specified by:
update in class ReducedModelState