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

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

public class Free
extends ReducedModelState

Shadowing state that indicates normal, unshadowed text.

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

Field Summary
static Free 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 Free()
           
 
Method Summary
(package private)  ReducedModelState update(TokenList.Iterator copyCursor)
          Walk function for when we're not inside a string or comment.
 
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 Free ONLY
Constructor Detail

Free

private Free()
Method Detail

update

ReducedModelState update(TokenList.Iterator copyCursor)
Walk function for when we're not inside a string or comment. Self-recursive and mutually recursive with other walk functions.
  1. atEnd: return
  2. If we find / *, * /, or / /, combine them into a single Brace, and keep the cursor on that Brace.
  3. If current brace = //, go to next then call updateLineComment.
    If current brace = /*, go to next then call updateBlockComment.
    If current brace = ", go to next then call updateInsideDoubleQuote.
    Else, mark current brace as FREE, go to the next brace, and recur.
Overrides:
update in class ReducedModelState