private Token.Comment LexComment() { var comment = new Token.Comment(); // Eat the '#' Read(); // Determine the comment type var c = comment.TypeChar = Peek(); var type = Comment.GetCommentType(comment.TypeChar); // Eat the one of four comment type characters from above if (type != CommentType.Translator) { Read(); } // Eat whitespace and then start accumulating the comment value EatWhitespace(); while ((c = Read()) != '\n') { PushString(c); } comment.Value = PopString(); return(comment); }
private Token.Comment LexComment() { var comment = new Token.Comment (); // Eat the '#' Read (); // Determine the comment type var c = comment.TypeChar = Peek (); var type = Comment.GetCommentType (comment.TypeChar); // Eat the one of four comment type characters from above if (type != CommentType.Translator) { Read (); } // Eat whitespace and then start accumulating the comment value EatWhitespace (); while ((c = Read ()) != '\n') { PushString (c); } comment.Value = PopString (); return comment; }