Class TokenComment

java.lang.Object
com.io7m.jsx.api.tokens.TokenComment
All Implemented Interfaces:
TokenType

public final class TokenComment extends Object implements TokenType
A comment.
  • Constructor Details

    • TokenComment

      public TokenComment(com.io7m.jlexing.core.LexicalPosition<URI> in_lex, JSXLexerComment in_comment, String in_text)
      Parameters:
      in_lex - The lexical information
      in_comment - The comment type
      in_text - The token text
  • Method Details

    • comment

      public JSXLexerComment comment()
      Returns:
      The comment type
    • lexical

      public com.io7m.jlexing.core.LexicalPosition<URI> lexical()
      Specified by:
      lexical in interface TokenType
      Returns:
      The lexical information for the token
    • text

      public String text()
      Returns:
      The text content of the token
    • matchToken

      public <A, E extends Exception> A matchToken(TokenMatcherType<A,E> m) throws E
      Description copied from interface: TokenType
      Match a token.
      Specified by:
      matchToken in interface TokenType
      Type Parameters:
      A - The type of values returned by the matcher
      E - The type of exceptions raised by the matcher
      Parameters:
      m - The matcher
      Returns:
      The value returned by the matcher
      Throws:
      E - If the matcher raises E
    • toString

      public String toString()
      Overrides:
      toString in class Object