eudoxia0 / cl-yaml

YAML parser for Common Lisp
61 stars 7 forks source link

Fix: parse alias as string #17

Open kilianmh opened 1 year ago

kilianmh commented 1 year ago

Problem: alias (e.g. *alias) ignored -> distorted parsing result order

Workaround: parse alias (name) as a string -> correct parsing order -> function to serialize alias node referring back to anchor might be implemented later

Example:

(cl-yaml:emit-to-string (cl-yaml:parse
"alias: *test-alias
input: 1"))

before: "{ 1: false, \"alias\": \"input\" }" now: "{ \"input\": 1, \"alias\": \"*test-alias\" }"

kilianmh commented 1 year ago

What do you think about this PR @eudoxia0 ?

eudoxia0 commented 1 year ago

I wonder if this will break existing code.