Norio Nomura
5439041573
Add `Parser.singleRoot()`
...
It supports behavior that expected by `YamlParserTests.testParseInvalidStringThrows` in SwiftLint.
2017-02-26 22:09:11 +09:00
Norio Nomura
6b1473bee6
Add test that verify `nextRoot()` throws on Invalid YAML
...
Invalid YAML is used by `YamlParserTests.testParseInvalidStringThrows` in SwiftLint.
2017-02-26 22:07:00 +09:00
Norio Nomura
6d64c51aa8
Merge branch 'nn-refactor-resolve-tag' into nn-refactor-nested-types
...
* nn-refactor-resolve-tag:
Change `Tag` to `.implicit` when changing `Scalar.string`
Add test to confirm that `Tag` will change when changing `Scalar.string`
Make `Tag` conform to` CustomStringConvertible`
Add `TagResolvable` and separate the differences in Resolving processes of each types
2017-02-25 00:27:33 +09:00
Norio Nomura
349b85ead8
Change `Tag` to `.implicit` when changing `Scalar.string`
2017-02-25 00:27:10 +09:00
Norio Nomura
ddfa371ca5
Add test to confirm that `Tag` will change when changing `Scalar.string`
2017-02-25 00:24:12 +09:00
Norio Nomura
53d663596c
Make `Tag` conform to` CustomStringConvertible`
2017-02-25 00:22:41 +09:00
Norio Nomura
f61661031b
Add `TagResolvable` and separate the differences in Resolving processes of each types
2017-02-25 00:06:39 +09:00
Norio Nomura
194a1635b5
Merge branch 'nn-refactor-scalar' into nn-refactor-nested-types
...
* nn-refactor-scalar:
Delegate `Comparable` of `Node` to `Node.Scalar`, `Node.Mapping` and `Node.Sequence`
Move implementation of `Node.Scalar` to `Node.Scalar.swift`
2017-02-24 23:55:40 +09:00
Norio Nomura
1dda476bfc
Delegate `Comparable` of `Node` to `Node.Scalar`, `Node.Mapping` and `Node.Sequence`
2017-02-24 23:55:06 +09:00
Norio Nomura
b145abb9ad
Move implementation of `Node.Scalar` to `Node.Scalar.swift`
2017-02-24 23:49:35 +09:00
Norio Nomura
86551420fa
Fix swiftlint violations
2017-02-24 18:55:40 +09:00
Norio Nomura
2453948b01
Merge branch 'nn-refactor-sequence' into nn-refactor-nested-types
...
* nn-refactor-sequence:
Change `Node.Sequence.node` to fileprivate
Move implementation of `Node.Sequence` to `Node.Sequence.swift`
2017-02-24 18:54:07 +09:00
Norio Nomura
5aa61a1a0f
Change `Node.Sequence.node` to fileprivate
2017-02-24 18:53:37 +09:00
Norio Nomura
b421ee8ac2
Move implementation of `Node.Sequence` to `Node.Sequence.swift`
2017-02-24 18:33:55 +09:00
Norio Nomura
110b2df419
Merge branch 'nn-refactor-mapping' into nn-refactor-nested-types
...
* nn-refactor-mapping:
Change `Pair` to fileprivate
Add `index(forKey:)` to `Node.Mapping`
Move implementation of `Node.Mapping` and `Pair` to `Node.Mapping.swift`
2017-02-24 18:26:13 +09:00
Norio Nomura
92cb330269
Change `Pair` to fileprivate
2017-02-24 18:24:38 +09:00
Norio Nomura
88b629b559
Add `index(forKey:)` to `Node.Mapping`
2017-02-24 18:08:57 +09:00
Norio Nomura
4e2084359d
Move implementation of `Node.Mapping` and `Pair` to `Node.Mapping.swift`
2017-02-24 18:08:42 +09:00
Norio Nomura
697c1ec829
Merge branch 'nn-refactor-resolve-tag' into nn-refactor-nested-types
...
* nn-refactor-resolve-tag:
Delegate `Equatable` of `Node` to `Node.Scalar`, `Node.Mapping` and `Node.Sequence`
Add `resolved(with:)` taking each of `Node.Scalar`, `Node.Mapping` and `Node.Sequence` to `Tag`
Add `resolveTag(of:)` taking each of `Node.Scalar`, `Node.Mapping` and `Node.Sequence` to `Resolver`
2017-02-24 18:00:46 +09:00
Norio Nomura
8d744c558b
Delegate `Equatable` of `Node` to `Node.Scalar`, `Node.Mapping` and `Node.Sequence`
2017-02-24 17:57:03 +09:00
Norio Nomura
e19cc3324d
Add `resolved(with:)` taking each of `Node.Scalar`, `Node.Mapping` and `Node.Sequence` to `Tag`
2017-02-24 17:50:33 +09:00
Norio Nomura
9a6066c0f8
Add `resolveTag(of:)` taking each of `Node.Scalar`, `Node.Mapping` and `Node.Sequence` to `Resolver`
2017-02-24 17:50:08 +09:00
Norio Nomura
06b38f0f09
Change `Tag.init(…)` from internal to public
...
Remove `@testable` from some test cases.
2017-02-24 09:07:12 +09:00
Norio Nomura
4c1763b3d5
Add `Node.init(_ pairs: [Node], …)` and replace `.sequence(.init(…))` with that
2017-02-24 00:31:10 +09:00
Norio Nomura
f1c889f844
Change access level of `Pair` from public to internal
2017-02-24 00:21:40 +09:00
Norio Nomura
7ce5405592
Add `Node.init(_ pairs: [(Node, Node)], …)` and replace `.mapping(.init(…))` with that
2017-02-24 00:17:15 +09:00
Norio Nomura
1be97d24e5
Replace `Node.scalar(.init(…))` with `Node.init(…)`
2017-02-23 23:18:19 +09:00
Norio Nomura
c0a427847e
Change type of `Node.init(_:_:_:)`’s `tag` parameter from `Tag.Name` to `Tag`
2017-02-23 23:15:43 +09:00
Norio Nomura
faee5328da
Change associated values of `Node.sequence`’s from `([Node], Tag, Node.Sequence.Style)` to `(Node.Sequence)`
2017-02-23 22:35:43 +09:00
Norio Nomura
2745c861bc
Change associated values of `Node.mapping`’s from `([Pair<Node>], Tag, Node.Mapping.Style)` to `(Node.Mapping)`
2017-02-23 22:30:22 +09:00
Norio Nomura
b72eea3b02
Change associated values of `Node.scalar`’s from `(String, Tag, Node.Scalar.Style)` to `(Node.Scalar)`
2017-02-23 18:47:05 +09:00
Norio Nomura
8551f6d084
Merge pull request #19 from jpsim/nn-swift3.1-on-linux
...
Support swift-3.1-DEVELOPMENT-SNAPSHOT-2017-01-31-a on Linux
2017-02-05 08:54:04 +09:00
Norio Nomura
b499fd463f
Add a job using Swift 3.1 (norionomura/sourcekit:3120170131a) for Linux to Travis
2017-02-04 21:53:59 +09:00
Norio Nomura
51b66fa3a9
Enable the disabled tests that have been fixed on Swift 3.1
...
https://bugs.swift.org/browse/SR-3366
2017-02-04 21:53:59 +09:00
Norio Nomura
a3fe8ce92b
Use `NSRegularExpression` on Swift 3.1 for Linux
2017-02-04 21:28:31 +09:00
Norio Nomura
2fd2f9c558
Merge pull request #18 from jpsim/nn-further-improve-node
...
Further improve Node
2017-02-04 21:18:30 +09:00
Norio Nomura
44569e7e92
Add tests of `Node.subscript(_:)`
2017-02-04 00:29:21 +09:00
Norio Nomura
5e3c6be8e3
Change `Node.Mapping.pairs` and `Node.Sequence.nodes` to internal
2017-02-04 00:07:32 +09:00
Norio Nomura
f30798d6e6
Add `Node.subscript(string:)`
2017-02-04 00:01:15 +09:00
Norio Nomura
ef1b965c5e
Make `Node.Sequence` behave like an `Array<Node>`
2017-02-04 00:00:36 +09:00
Norio Nomura
c625d66880
Make `Node.Mapping` behave like a `Dictionary<Node, Node>`
2017-02-03 23:55:32 +09:00
JP Simard
71e81e9fbc
release 0.2.0
2017-02-02 17:40:21 -08:00
JP Simard
d539c91938
Merge pull request #15 from jpsim/nn-use-emitter
...
Implement Emitter
2017-02-02 17:36:16 -08:00
JP Simard
7a57411c9e
fix minor typos in comments
2017-02-02 17:28:37 -08:00
Norio Nomura
1f365da5f8
Add documentation comments
2017-02-01 18:29:49 +09:00
Norio Nomura
3eb97ee3f4
Avoid SwiftLint violation
2017-02-01 18:16:37 +09:00
Norio Nomura
7da52edb58
Add setter to `subscript()` of `Node`
2017-02-01 18:15:41 +09:00
Norio Nomura
c291b4c00e
Rewrite `dump()` and add `dump()` execution to each tests in `SpecTests`
2017-02-01 14:23:30 +09:00
Norio Nomura
c8ad176822
Organize files
...
- Rename `ParserTests` to `SpecTests`
- Reorder files in xcode project
2017-02-01 11:08:37 +09:00
Norio Nomura
0599313d3d
Change to sort mapping on representing Dictionary
2017-01-31 13:42:00 +09:00