Repository navigation
Tags
Tags
feat: Add `WithDetachedComments`, a functional option for `Parse`, `P… …arseString`, and `ParseBytes` (#37) Allows parsing detached comments as nodes in the AST. Allows distinguishing the following scenarios: ```hcl // We see this as a LEADING comment // that — because no empty lines separates it from the subsequent block — // we see as semantically attached to the block. // alecthomas/hcl parses it into the block's `Comments`. // There is no change of behavior. block {} ``` ```hcl // We see this as a DETACHED comment // that — because empty lines separate it from the subsequent block — // we see as semantically divorced from the block // alecthomas/hcl parses it into a Comment node. // The new behavior is opt-in. block {} ``` ```hcl block {} // We see this as a DETACHED comment // that — because it trails the preceding block — // we see as semantically divorced from the block // alecthomas/hcl parses it into a Comment node _as well as_ TrailingComments. // The new behavior is opt-in. ```
fix: support for TextUnmarshaler in schema reflection It was mistakenly checking for TextMarshaler instead.
PreviousNext