1 33 34 package edu.rice.cs.drjava.model.definitions.reducedmodel; 35 36 40 public class InsideBlockComment extends ReducedModelState { 41 public static final InsideBlockComment ONLY = new InsideBlockComment(); 42 43 private InsideBlockComment() { } 44 45 60 ReducedModelState update(TokenList.Iterator copyCursor) { 61 if (copyCursor.atEnd()) { 62 return STUTTER; 63 } 64 _combineCurrentAndNextIfFind("*", "/", copyCursor); 65 _combineCurrentAndNextIfFind("*","//", copyCursor); 66 _combineCurrentAndNextIfFind("*","/*", copyCursor); 67 _combineCurrentAndNextIfFind("","", copyCursor); 68 _combineCurrentAndNextIfEscape(copyCursor); 69 70 copyCursor._splitCurrentIfCommentBlock(false, false); 71 72 String type = copyCursor.current().getType(); 73 if (type.equals("*/")) { 74 copyCursor.current().setState(FREE); 75 copyCursor.next(); 76 return FREE; 77 } 78 79 else { 80 copyCursor.current().setState(INSIDE_BLOCK_COMMENT); 81 copyCursor.next(); 82 return INSIDE_BLOCK_COMMENT; 83 } 84 } 85 } 86 | Popular Tags |