Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Documentation/Evolution/RegexLiteralPitch.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Multi-line comments use the `/*` delimiter. As such, a regex literal starting wi

#### On custom infix operators using the `/` character

Choosing `/` as the delimiter means there will a conflict for infix operators containing `/` in cases where whitespace isn't used, for example:
Choosing `/` as the delimiter means there will be a conflict for infix operators containing `/` in cases where whitespace isn't used, for example:

```swift
x+/y/+z
Expand Down
6 changes: 3 additions & 3 deletions Sources/Prototypes/PTCaRet/PTCaRet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ extension PTCaRet.Formula {
_ a: Formula,
during b: Formula
) -> Formula {
// Note: More effient to implement directly
// Note: More efficient to implement directly
.and(
.implies(b, a),
.implies(.not(b), .since(.previously(.implies(b, a)), b)))
Expand Down Expand Up @@ -429,7 +429,7 @@ extension PTCaRet.Formula {
.atFunctionBegin(.previously(a))
}

/// `a` has held true at every occurence of `filterA` since the
/// `a` has held true at every occurrence of `filterA` since the
/// most recent occurrence of both `b` and `filterB`.
///
/// (filterA → a) S (filterB ∧ b)
Expand All @@ -441,7 +441,7 @@ extension PTCaRet.Formula {
.since(.implies(filterA, a), .and(filterB, b))
}

/// `a` has held true at every occurence of `filterA` since the
/// `a` has held true at every occurrence of `filterA` since the
/// most recent occurrence of both `b` and `filterB`.
///
/// (filterA → a) S̅ (filterB ∧ b)
Expand Down
2 changes: 1 addition & 1 deletion Sources/_MatchingEngine/Regex/AST/Atom.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ extension AST.Atom {
// an escape sequence.
@frozen
public enum EscapedBuiltin: Hashable {
// TOOD: better doc comments
// TODO: better doc comments

// Literal single characters

Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/Engine/MEBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ extension MEProgram.Builder {

extension MEProgram.Builder {
// TODO: We want a better strategy for fixups, leaving
// the operand in a differenet form isn't great...
// the operand in a different form isn't great...

public init<S: Sequence>(staticElements: S) where S.Element == Input.Element {
staticElements.forEach { elements.store($0) }
Expand Down
4 changes: 2 additions & 2 deletions Sources/_StringProcessing/Legacy/RECode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extension RECode {
/// NOP (currently unused).
case nop

/// Denote a sucessful match. (currently used only at the end of a program).
/// Denote a successful match. (currently used only at the end of a program).
case accept

/// Consume and try to match a unit of input.
Expand Down Expand Up @@ -105,7 +105,7 @@ extension RECode.Instruction {
return id
}

/// Whether this instruction particpcates in matching
/// Whether this instruction participates in matching
var isMatching: Bool {
switch self {
case .accept: return true
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/Legacy/VirtualMachine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ extension RECode {

/// Ends the current capture at the given index and applies the given
/// transform if available. Returns true on success. Returns false if the
/// trasnform failed.
/// transform failed.
mutating func endCapture(
_ endIndex: String.Index, transform: CaptureTransform?
) -> Bool {
Expand Down
8 changes: 4 additions & 4 deletions Sources/_StringProcessing/PrintAsPattern.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ extension PrettyPrinter {
print(a._patternBase)

case .assertion:
print("/* TOOD: assertions */")
print("/* TODO: assertions */")
case .backreference:
print("/* TOOD: backreferences */")
print("/* TODO: backreferences */")
}

case .trivia:
Expand All @@ -141,7 +141,7 @@ extension PrettyPrinter {

case let .convertedRegexLiteral(n, _):
// FIXME: This recursion coordinates with back-off
// check above, so it shoud work out. Need a
// check above, so it should work out. Need a
// cleaner way to do this. This means the argument
// label is a lie.
printAsPattern(convertedFromAST: n)
Expand Down Expand Up @@ -315,7 +315,7 @@ extension AST.Group.Kind {
var _patternBase: String {
switch self {
case .capture:
// TODO: We probably want this to be a prperty after group
// TODO: We probably want this to be a property after group
return ".capture"

case .namedCapture(let n):
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/RegexDSL/DSLTree.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ extension DSLTree {

/// The target of AST conversion.
///
/// Keeps original AST around for rich syntatic and source information
/// Keeps original AST around for rich syntactic and source information
case convertedRegexLiteral(Node, AST.Node)

// MARK: - Extensibility points
Expand Down