A CommentState object that returns a comment from a scanner.
Description
The GenericCommentState class allows you to create a CommentState object that returns a comment from a scanner.
Constructors
NewGenericCommentState
Creates new instance of the component
NewGenericCommentState() *GenericCommentState
Methods
NextToken
Either delegates to a comment-handling state, or returns a token with just a slash in it.
(c *GenericCommentState) NextToken(scanner IScanner, tokenizer ITokenizer) *Token
- scanner: IScanner - text string to be tokenized.
- tokenizer: ITokenizer - tokenizer class that controls the process.
- returns: *Token - next token from the top of the stream.