private void ProcessCharacter(char aCharacter) { int count = iWorkers.Count; // for (int i = 0; i < count; i++) { SymLexerWorker worker = (SymLexerWorker)iWorkers[i]; bool consumed = worker.ProcessCharacter(aCharacter); // if (consumed) { break; } } }
public void HandleEndOfLineDetected(SymTextPosition aEOLPosition) { // Report to children int count = iWorkers.Count; for (int i = 0; i < count; i++) { SymLexerWorker worker = (SymLexerWorker)iWorkers[i]; worker.StartedNewLine(aEOLPosition); } // Add a token for the new line - do this after reporting the // event to the children so that they can flush any data // they have before we append the new line. SymToken token = new SymToken("", SymToken.TClass.EClassNewLine, aEOLPosition); FlushToken(token); // Report new line event ReportEvent(TEvent.EEventLexingNewLine, token); }
internal void RegisterWorker(SymLexerWorker aWorker) { iWorkers.Add(aWorker); }