1 33 34 package edu.rice.cs.drjava.model.definitions.reducedmodel; 35 36 40 public class InsideLineComment extends ReducedModelState { 41 public static final InsideLineComment ONLY = new InsideLineComment(); 42 43 private InsideLineComment() { } 44 45 56 ReducedModelState update(TokenList.Iterator copyCursor) { 57 if (copyCursor.atEnd()) return STUTTER; 58 copyCursor._splitCurrentIfCommentBlock(true, false); 59 _combineCurrentAndNextIfFind("","", copyCursor); 60 _combineCurrentAndNextIfEscape(copyCursor); 61 62 String type = copyCursor.current().getType(); 63 64 if (type.equals("\n")) { 65 copyCursor.current().setState(FREE); 66 copyCursor.next(); 67 return FREE; 68 } 69 else { 70 copyCursor.current().setState(INSIDE_LINE_COMMENT); 71 copyCursor.next(); 72 return INSIDE_LINE_COMMENT; 73 } 74 } 75 } 76 | Popular Tags |