dlang-community / D-YAML

YAML parser and emitter for the D programming language
https://dlang-community.github.io/D-YAML/
Boost Software License 1.0
118 stars 38 forks source link

Add `Node.startMark` #263

Closed tom-tan closed 3 years ago

tom-tan commented 3 years ago

This request is to solve #256 by making dyaml.exception.Mark public and by adding dyaml.node.Node.startMark to get the start position of the node.

Although it lacks some information such as the file name, it is quite useful to provide fine-grained messages.

codecov[bot] commented 3 years ago

Codecov Report

Merging #263 into master will decrease coverage by 0.04%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #263      +/-   ##
==========================================
- Coverage   94.96%   94.92%   -0.05%     
==========================================
  Files          29       28       -1     
  Lines        4170     4137      -33     
==========================================
- Hits         3960     3927      -33     
  Misses        210      210              
Impacted Files Coverage Δ
source/dyaml/exception.d 76.47% <0.00%> (-10.20%) :arrow_down:
source/dyaml/node.d 92.43% <0.00%> (-0.11%) :arrow_down:
contrib/tinyendian/source/tinyendian.d

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update bd549ca...c9ad56d. Read the comment docs.

Herringway commented 3 years ago

The user should be able to keep track of the filename (if any) on their own, so that should not be an issue

tom-tan commented 3 years ago

Thanks!