Record Class JSXLexerConfiguration

java.lang.Object
java.lang.Record
com.io7m.jsx.api.lexer.JSXLexerConfiguration
Record Components:
squareBrackets - true iff square brackets are allowed to denote lists
newlinesInQuotedStrings - true iff newlines are allowed in quoted strings
file - The URI that will be used in lexical information, if any
comments - The string(s) used to start line comments
startAtLine - The starting line number (for lexical information)

public record JSXLexerConfiguration(boolean squareBrackets, boolean newlinesInQuotedStrings, Optional<URI> file, EnumSet<JSXLexerComment> comments, int startAtLine) extends Record
The type of lexer configurations.
  • Constructor Details

    • JSXLexerConfiguration

      public JSXLexerConfiguration(boolean squareBrackets, boolean newlinesInQuotedStrings, Optional<URI> file, EnumSet<JSXLexerComment> comments, int startAtLine)
      The type of lexer configurations.
      Parameters:
      squareBrackets - true iff square brackets are allowed to denote lists
      newlinesInQuotedStrings - true iff newlines are allowed in quoted strings
      file - The URI that will be used in lexical information, if any
      comments - The string(s) used to start line comments
      startAtLine - The starting line number (for lexical information)
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • squareBrackets

      public boolean squareBrackets()
      Returns the value of the squareBrackets record component.
      Returns:
      the value of the squareBrackets record component
    • newlinesInQuotedStrings

      public boolean newlinesInQuotedStrings()
      Returns the value of the newlinesInQuotedStrings record component.
      Returns:
      the value of the newlinesInQuotedStrings record component
    • file

      public Optional<URI> file()
      Returns the value of the file record component.
      Returns:
      the value of the file record component
    • comments

      public EnumSet<JSXLexerComment> comments()
      Returns the value of the comments record component.
      Returns:
      the value of the comments record component
    • startAtLine

      public int startAtLine()
      Returns the value of the startAtLine record component.
      Returns:
      the value of the startAtLine record component