public void visitBuilder(StyleSpansBuilder<Collection<String>> builder) {
			int lastEnd = start;

			// Add children
			for (Region child : children) {
				int childStart = child.start;

				// Append text not matched at start
				if (childStart > lastEnd) {
					int len = childStart - lastEnd;
					builder.add(child.unmatchedClasses(), len);
				}

				// Append child content
				child.visitBuilder(builder);
				lastEnd = child.end;
			}

			// Append remaining unmatched text
			int len = end - lastEnd;
			builder.add(currentClasses(), len);
		}
Appends style spans to the given builder.
The classes for each span take into account this classes of the {@link #rule} and the {@link #parent} rules.

@param builder
		Builder to append to.
recaf-ui/src/main/java/software/coley/recaf/ui/control/richtext/syntax/RegexSyntaxHighlighter.java