Members

addRegenerate

This is added as a method on the RangeGroup prototype. This will add ranges from the RangeGroup to a regenerate object, excluding string ranges. This can be used to generate a RegExp matching the characters of the group. Note that the regenerate library is not included as a dependency.

Type Definitions

Node

AST node generated by the parser

Type:
  • object
Properties
NameTypeAttributesDescription
typestring

The node type; can be one of the following:

  • empty: an empty set
  • group: a group of 2+ sets to be combined with set operations
  • property: a set defined by unicode property name/value
  • char: single characters
  • charRange: character ranges
  • string: single strings
  • stringRange: string ranges
opstring

A set operation indicating how it should be combined with the previous set in a group. One of: union, difference, intersect, or symmetricDifference

invertboolean

Whether the set is inverted (e.g. the unary complement set operation)

namestring<nullable>

Only present for property type; it is the extracted property name

valueany<nullable>

Absent for empty type. Otherwise:

  • group: a list of nested Node
  • property: the extracted property value string
  • char and string: a list of strings
  • charRange and stringRange: a list of string tuples, giving range [start, end]
groupCodepoints<nullable>

Only present for property type; it represents the set of codepoints for that unicode property name-value pair