weaponregex.internal.model.regextree.characterClassNode.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of weapon-regex_2.12 Show documentation
Show all versions of weapon-regex_2.12 Show documentation
Weapon regeX mutates regular expressions for use in mutation testing.
The newest version!
package weaponregex.internal.model.regextree
import weaponregex.model.Location
/** Character class node
*
* @param nodes
* The child nodes contained in the character class
* @param location
* The [[weaponregex.model.Location]] of the node in the regex string
* @param isPositive
* `true` if the character class is positive, `false` otherwise
*/
case class CharacterClass(nodes: Seq[RegexTree], override val location: Location, isPositive: Boolean = true)
extends Node(nodes, location, if (isPositive) "[" else "[^", "]")
/** Character class node without the surround syntactical symbols, i.e. "naked"
* @param nodes
* The child nodes contained in the character class
* @param location
* The [[weaponregex.model.Location]] of the node in the regex string
*/
case class CharacterClassNaked(nodes: Seq[RegexTree], override val location: Location) extends Node(nodes, location)
/** Character class intersection used inside a character class
* @param nodes
* The nodes that are being "or-ed"
* @param location
* The [[weaponregex.model.Location]] of the node in the regex string
*/
case class CharClassIntersection(nodes: Seq[RegexTree], override val location: Location)
extends Node(nodes, location, sep = "&&")
/** Character range that is used inside of a character class
* @param from
* The left bound of the range
* @param to
* The right bound of the range
* @param location
* The [[weaponregex.model.Location]] of the node in the regex string
*/
case class Range(from: Character, to: Character, override val location: Location)
extends Node(Seq(from, to), location, sep = "-")
© 2015 - 2024 Weber Informatics LLC | Privacy Policy