Skip to content

Commit

Permalink
Introduce SourceFile that stores the path and content text of a sourc…
Browse files Browse the repository at this point in the history
…e code file
  • Loading branch information
Ryuichi Saito committed Dec 25, 2015
1 parent 0a48601 commit 1ae7011
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 4 deletions.
30 changes: 26 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,33 @@ import PackageDescription
let package = Package(
name: "swift-ast",
targets: [
Target(name: "ast", dependencies: [.Target(name: "util")]),
Target(name: "parser", dependencies: [.Target(name: "util"), .Target(name: "ast")]),
Target(name: "swift-ast", dependencies: [.Target(name: "parser")]),
Target(
name: "source"
),
Target(
name: "ast",
dependencies: [
.Target(name: "util"),
.Target(name: "source"),
]
),
Target(
name: "parser",
dependencies: [
.Target(name: "util"),
.Target(name: "source"),
.Target(name: "ast"),
]
),
Target(
name: "swift-ast",
dependencies: [
.Target(name: "source"),
.Target(name: "parser"),
]
),
],
testDependencies: [
.Package(url: "https://github.com/kylef/Spectre.git", majorVersion: 0)
.Package(url: "https://github.com/kylef/Spectre.git", majorVersion: 0),
]
)
22 changes: 22 additions & 0 deletions Sources/source/SourceFile.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
Copyright 2015 Ryuichi Saito, LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Merry Christmas 2015! -Ryuichi

public struct SourceFile {
let path: String
let content: String
}

0 comments on commit 1ae7011

Please sign in to comment.