Skip to content

Commit

Permalink
Remove debug logging in Node set-/getproperty calls (#19)
Browse files Browse the repository at this point in the history
Co-authored-by: Morten Piibeleht <[email protected]>
  • Loading branch information
ericphanson and mortenpi authored Oct 6, 2023
1 parent f5e2204 commit 336628b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

* ![Feature][badge-feature] Implemented `replace` and `replace!` to safely mutate trees in arbitrary ways, and `empty!(node.children)` to remove all the children of a node
* ![Bugfix][badge-bugfix] The `getproperty` and `setproperty!` methods no longer print unnecessary debug log. ([#19][github-19])

## Version `v0.1.1`

Expand All @@ -14,6 +15,7 @@ Initial release.

<!-- issue link definitions -->
[github-16]: https://github.com/JuliaDocs/MarkdownAST.jl/pull/16
[github-19]: https://github.com/JuliaDocs/MarkdownAST.jl/pull/19
<!-- end of issue link definitions -->

[markdownast]: https://github.com/JuliaDocs/MarkdownAST.jl
Expand Down
3 changes: 0 additions & 3 deletions src/node.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ function Base.getproperty(node::Node{T}, name::Symbol) where T
getfield(node, :meta)
else
# TODO: error("type Node does not have property $(name)")
@debug "Accessing private field $(name) of Node" stacktrace()
getfield(node, name)
end
end
Expand All @@ -129,11 +128,9 @@ function Base.setproperty!(node::Node, name::Symbol, x)
setfield!(node, :meta, x)
elseif name in propertynames(node)
# TODO: error("Unable to set property $(name) for Node")
@debug "Setting private field :$(name) of Node" stacktrace()
setfield!(node, name, x)
else
# TODO: error("type Node does not have property $(name)")
@debug "Accessing private field :$(name) of Node" stacktrace()
setfield!(node, name, x)
end
end
Expand Down

0 comments on commit 336628b

Please sign in to comment.