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

java.lang.Object
  |
  +--edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedModelState
        |
        +--edu.rice.cs.drjava.model.definitions.reducedmodel.InsideDoubleQuote
All Implemented Interfaces:
ReducedModelStates

public class InsideDoubleQuote
extends ReducedModelState

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

Version:
$Id: InsideDoubleQuote.java,v 1.7 2002/02/08 14:22:21 brianstoler Exp $

Field Summary
static InsideDoubleQuote ONLY
           
 
Fields inherited from interface edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedModelStates
FREE, INSIDE_BLOCK_COMMENT, INSIDE_DOUBLE_QUOTE, INSIDE_LINE_COMMENT, INSIDE_SINGLE_QUOTE, STUTTER
 
Constructor Summary
private InsideDoubleQuote()
           
 
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, registerNatives, toString, wait, wait, wait
 

Field Detail

ONLY

public static final InsideDoubleQuote ONLY
Constructor Detail

InsideDoubleQuote

private InsideDoubleQuote()
Method Detail

update

ReducedModelState update(TokenList.Iterator copyCursor)
Walk function for when inside a quoted string. Self-recursive and 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.
Overrides:
update in class ReducedModelState