Rule

public struct Rule

Rule describing how to resolve tags from regex patterns.

  • tag

    The tag name this rule applies to.

    Declaration

    Swift

    public let tag: Tag.Name
  • The regex pattern used to resolve this rule.

    Declaration

    Swift

    public var pattern: String { get }
  • Create a rule with the specified tag name and regex pattern.

    Throws

    Throws an error if the regular expression pattern is invalid.

    Declaration

    Swift

    public init(_ tag: Tag.Name, _ pattern: String) throws

    Parameters

    tag

    The tag name this rule should apply to.

    pattern

    The regex pattern used to resolve this rule.

Default Resolver Rules