Class CppCommentState

    • Constructor Detail

      • CppCommentState

        public CppCommentState()
    • Method Detail

      • getMultiLineComment

        protected String getMultiLineComment​(IScanner scanner)
        Ignore everything up to a closing star and slash, and then return the tokenizer's next token.
        Parameters:
        scanner -
        Returns:
      • getSingleLineComment

        protected String getSingleLineComment​(IScanner scanner)
        Ignore everything up to an end-of-line and return the tokenizer's next token.
        Parameters:
        scanner -
      • nextToken

        public Token nextToken​(IScanner scanner,
                               ITokenizer tokenizer)
                        throws Exception
        Either delegate to a comment-handling state, or return a token with just a slash in it.
        Specified by:
        nextToken in interface ITokenizerState
        Overrides:
        nextToken in class GenericCommentState
        Parameters:
        scanner - A textual string to be tokenized.
        tokenizer - A tokenizer class that controls the process.
        Returns:
        The next token from the top of the stream.
        Throws:
        Exception