Skip to content

Add copyright comment to start of each Swift file #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 11, 2022
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
11 changes: 11 additions & 0 deletions Sources/Exercises/Exercises.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

public enum Exercises {
public static var allParticipants: Array<Participant.Type> {
[
Expand Down
11 changes: 11 additions & 0 deletions Sources/Exercises/GraphemeBreakData.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

extension Unicode.Scalar {
// Convert a hexadecimal string to a scalar
public init?<S: StringProtocol>(hex: S) {
Expand Down
11 changes: 11 additions & 0 deletions Sources/Exercises/Participant.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

/// Participants engage in a number of exercises.
///
/// Default implementations will throw `Unsupported`.
Expand Down
11 changes: 11 additions & 0 deletions Sources/Exercises/Participants/HandWrittenParticipant.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

struct HandWrittenParticipant: Participant {
static var name: String { "HandWritten" }

Expand Down
11 changes: 11 additions & 0 deletions Sources/Exercises/Participants/NSREParticipant.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

import Foundation

struct NSREParticipant: Participant {
Expand Down
11 changes: 11 additions & 0 deletions Sources/Exercises/Participants/NaiveParticipant.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

struct NaiveParticipant: Participant {
static var name: String { "Naive" }

Expand Down
11 changes: 11 additions & 0 deletions Sources/Exercises/Participants/PEGParticipant.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

struct PEGParticipant: Participant {
static var name: String { "PEG" }
}
Expand Down
11 changes: 11 additions & 0 deletions Sources/Exercises/Participants/ReferenceParticipant.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//


struct ReferenceParticipant: Participant {
static var name: String { "Reference" }
Expand Down
11 changes: 11 additions & 0 deletions Sources/Exercises/Participants/RegexParticipant.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

import _StringProcessing

/*
Expand Down
11 changes: 11 additions & 0 deletions Sources/PatternConverter/PatternConverter.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

// swift run PatternConverter <regex>

import ArgumentParser
Expand Down
11 changes: 11 additions & 0 deletions Sources/Prototypes/Combinators/Combinators.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

import _MatchingEngine

/*
Expand Down
11 changes: 11 additions & 0 deletions Sources/Prototypes/PEG/PEG.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

public enum PEG<Element: Comparable & Hashable> {}

extension PEG {
Expand Down
11 changes: 11 additions & 0 deletions Sources/Prototypes/PEG/PEGCode.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

import _MatchingEngine

extension PEG.VM {
Expand Down
11 changes: 11 additions & 0 deletions Sources/Prototypes/PEG/PEGCompile.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

import _MatchingEngine

extension PEG.VM {
Expand Down
11 changes: 11 additions & 0 deletions Sources/Prototypes/PEG/PEGCore.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

import _MatchingEngine
let emitComments = true

Expand Down
11 changes: 11 additions & 0 deletions Sources/Prototypes/PEG/PEGInterpreter.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

import XCTest
extension PEG {
struct Grammar {
Expand Down
11 changes: 11 additions & 0 deletions Sources/Prototypes/PEG/PEGTranspile.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

import _MatchingEngine

extension PEG.VM {
Expand Down
11 changes: 11 additions & 0 deletions Sources/Prototypes/PEG/PEGVM.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

import _MatchingEngine

extension PEG {
Expand Down
11 changes: 11 additions & 0 deletions Sources/Prototypes/PEG/PEGVMExecute.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

extension PEG.VM {

// TODO: Consumers need a concept of forward progress.
Expand Down
11 changes: 11 additions & 0 deletions Sources/Prototypes/PEG/Printing.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

import _MatchingEngine

extension PEGCore.Instruction: InstructionProtocol {
Expand Down
11 changes: 11 additions & 0 deletions Sources/Prototypes/PTCaRet/Interpreter.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//


extension PTCaRet {

Expand Down
11 changes: 11 additions & 0 deletions Sources/Prototypes/PTCaRet/PTCaRet.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//


/*

Expand Down
11 changes: 11 additions & 0 deletions Sources/Prototypes/TourOfTypes/CharacterClass.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

// MARK: - Element Consumer

/// An alternate formation of consumers: Don't bind collection type as we're just
Expand Down
11 changes: 11 additions & 0 deletions Sources/Prototypes/TourOfTypes/Literal.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

// MARK: - Pitched Compiler/library interface

/// Conform to this to support regex literals
Expand Down
11 changes: 11 additions & 0 deletions Sources/VariadicsGenerator/VariadicsGenerator.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

// swift run VariadicsGenerator --max-arity 7 > Sources/_StringProcessing/RegexDSL/Concatenation.swift

import ArgumentParser
Expand Down
11 changes: 11 additions & 0 deletions Sources/_MatchingEngine/Engine/Builder.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

extension Program where Input.Element: Hashable {
public struct Builder {
var instructions: [Instruction] = []
Expand Down
Loading