private bool SkipToEndOfLine() { bool result = tokenizer.SkipToChar('\n'); if (!result) { FireEOFError(); } return(result); }
private bool ProcessCommentLine(TerminalToken token) { if (OnCommentRead == null) { tokenizer.SkipToChar('\n'); //SkipToEndOfLine(); return(true); } else { Location start = this.tokenizer.GetCurrentLocation(); tokenizer.SkipToChar('\n'); //SkipToEndOfLine(); Location end = this.tokenizer.GetCurrentLocation(); string str = this.tokenizer.GetInput(); int len = end.Position - start.Position; string comment = str.Substring(start.Position, len); CommentReadEventArgs args = new CommentReadEventArgs(token.Text + comment, comment, true); OnCommentRead(this, args); return(true); } }