All Downloads are FREE. Search and download functionalities are using the official Maven repository.

weaponregex.internal.model.regextree.quotationNode.scala Maven / Gradle / Ivy

The newest version!
package weaponregex.internal.model.regextree

import weaponregex.model.Location

/** Quote for the following single character
  *
  * @param char
  *   The character being quoted
  * @param location
  *   The [[weaponregex.model.Location]] of the node in the regex string
  */
case class QuoteChar(char: Char, override val location: Location) extends Leaf(char, location, """\""")

/** Quote from \Q to an optional \E
  * @param quote
  *   The string being quoted
  * @param hasEnd
  *   `true` if quote has an end symbol `\E`, `false` otherwise
  * @param location
  *   The [[weaponregex.model.Location]] of the node in the regex string
  */
case class Quote(quote: String, hasEnd: Boolean, override val location: Location)
    extends Leaf(quote, location, """\Q""", if (hasEnd) """\E""" else "")




© 2015 - 2024 Weber Informatics LLC | Privacy Policy