Skip to content
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

Adds the ability to access a Node's tag during decoding #352

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
12 changes: 2 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
## Main

##### Breaking

* None.
## 5.0.1

##### Enhancements

* None.

##### Bug Fixes

* None.
* Adds the ability to access a Node's `tag` during decoding. [Santiago Gutierrez](https://github.com/ssgutierrez42)

## 5.0.0

Expand Down
6 changes: 6 additions & 0 deletions Sources/Yams/Decoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,12 @@ extension Decoder {
public var mark: Mark? {
return (self as? _Decoder)?.node.mark
}

/// The `Tag` for the underlying `Node` that has been decoded.
public var tag: Tag? {
return (self as? _Decoder)?.node.tag
}

}

// MARK: TopLevelDecoder
Expand Down
2 changes: 2 additions & 0 deletions Yams.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@
DYLIB_CURRENT_VERSION = 1;
ENABLE_TESTABILITY = YES;
INFOPLIST_FILE = Yams.xcodeproj/Yams_Info.plist;
MARKETING_VERSION = 5.0.1;
PRODUCT_BUNDLE_IDENTIFIER = com.jpsim.Yams;
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
Expand All @@ -531,6 +532,7 @@
DYLIB_CURRENT_VERSION = 1;
ENABLE_TESTABILITY = YES;
INFOPLIST_FILE = Yams.xcodeproj/Yams_Info.plist;
MARKETING_VERSION = 5.0.1;
PRODUCT_BUNDLE_IDENTIFIER = com.jpsim.Yams;
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
Expand Down