edu.rice.cs.drjava.model.definitions.reducedmodel
Class ReducedModelState
java.lang.Object
|
+--edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedModelState
- All Implemented Interfaces:
- ReducedModelStates
- Direct Known Subclasses:
- Free, InsideBlockComment, InsideDoubleQuote, InsideLineComment, InsideSingleQuote, Stutter
- public abstract class ReducedModelState
- extends Object
- implements ReducedModelStates
The abstract notion of a shadowing state. We use shadowing to mean
the state of text as it is interpreted during compile. Commented text
is ignored, and quoted text does not factor into the ASTs generated
by the compiler except as a text constant. This buys us a lot in
terms of correctness when highlighting, indenting, and performing
other editor functions.
- Version:
- $Id: ReducedModelState.java,v 1.7 2002/02/08 14:22:21 brianstoler Exp $
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
ReducedModelState
public ReducedModelState()
update
abstract ReducedModelState update(TokenList.Iterator copyCursor)
_combineCurrentAndNextIfFind
boolean _combineCurrentAndNextIfFind(String first,
String second,
TokenList.Iterator copyCursor)
- Combines the current and next braces if they match the given types.
If we have braces of first and second in immediate succession, and if
second's gap is 0, combine them into first+second.
The cursor remains on the same block after this method is called.
- Parameters:
first
- the first half of a multiple char bracesecond
- the second half of a multiple char brace- Returns:
- true if we combined two braces or false if not
_combineCurrentAndNextIfEscape
boolean _combineCurrentAndNextIfEscape(TokenList.Iterator copyCursor)