Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CppCommentState

This state will either delegate to a comment-handling state, or return a token with just a slash in it.

Hierarchy

Implements

Index

Properties

Protected CR

CR: number = '\n'.charCodeAt(0)

Protected LF

LF: number = '\r'.charCodeAt(0)

Protected SLASH

SLASH: number = '/'.charCodeAt(0)

Protected STAR

STAR: number = '*'.charCodeAt(0)

Methods

Protected getMultiLineComment

  • getMultiLineComment(scanner: IScanner): string
  • Ignore everything up to a closing star and slash, and then return the tokenizer's next token.

    Parameters

    Returns string

Protected getSingleLineComment

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

    Parameters

    Returns string

nextToken

  • Either delegate to a comment-handling state, or return a token with just a slash in it.

    Parameters

    • scanner: IScanner

      A textual string to be tokenized.

    • tokenizer: ITokenizer

      A tokenizer class that controls the process.

    Returns Token

    The next token from the top of the stream.

Generated using TypeDoc