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

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

public class InsideBlockComment
extends ReducedModelState

The shadowing state that corresponds to being inside a block comment.

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

Field Summary
static InsideBlockComment ONLY
          Singleton instance
 
Constructor Summary
private InsideBlockComment()
          Singleton constructor
 
Method Summary
(package private)  ReducedModelState update(TokenList.Iterator copyCursor)
          Walk function for inside block 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, toString, wait, wait, wait
 

Field Detail

ONLY

public static final InsideBlockComment ONLY
Singleton instance

Constructor Detail

InsideBlockComment

private InsideBlockComment()
Singleton constructor

Method Detail

update

ReducedModelState update(TokenList.Iterator copyCursor)
Walk function for inside block comment. Mutually recursive with other walk functions.
  1. If we've reached the end of the list, return.
  2. If we find * /, combine it into a single Brace, and keep the cursor on that Brace.
  3. If we find // or /*, split that into two Braces and keep the cursor on the first one.
  4. If current brace = * /, mark the current brace as FREE, go to the next brace, and call updateFree.
    Else, mark current brace as INSIDE_BLOCK_COMMENT and go to next brace and recur.

Specified by:
update in class ReducedModelState