State state;
if (line.isFirstLine()) {
state = codeMirrorParser.defaultState();
} else {
state = line.getPreviousLine().getTag(LINE_TAG_END_OF_LINE_PARSER_STATE_SNAPSHOT);
state = (state == null) ? null : state.copy(codeMirrorParser);
}
@SuppressWarnings("unchecked")
T result = (T) state;
return result;