kdl icon indicating copy to clipboard operation
kdl copied to clipboard

Is the braces_in_bare_id test case correct?

Open pdoane opened this issue 9 months ago • 6 comments

I do not see how to parse this with the grammar:

foo123{bar}

Relevant bits:

node-children := '{' nodes final-node? '}'
base-node := slashdash? type? node-space* string
    (node-space+ slashdash? node-prop-or-arg)*
    // slashdashed node-children must always be after props and args.
    (node-space+ slashdash node-children)*
    (node-space+ node-children)?
    (node-space+ slashdash node-children)*
    node-space*

It looks to me that node-children must be proceeded by node-space?

pdoane avatar Mar 10 '25 15:03 pdoane

Huh, this was fixed in #499. @zkat, maybe you accidentally generated the current spec draft off of a commit that preceded this?

tabatkins avatar Mar 10 '25 16:03 tabatkins

Ah, it is indeed correct in the current spec.md in this repo, but the html version in https://github.com/kdl-org/kdl-org.github.io/blob/main/src/spec.html is out of date. @zkat, mind regenning? I don't have the toolchain for that set up.

tabatkins avatar Mar 10 '25 16:03 tabatkins

Thanks! Yes I was looking at the published version. I guess this change would be for 2.0.1?

pdoane avatar Mar 10 '25 17:03 pdoane

we probably don't want to regen: the main branch in this repo is post-2.0.0 and I think the site should specifically reflect the stable version.

zkat avatar Mar 10 '25 21:03 zkat

or maybe it's fine. idk. This particular grammar hiccup does kinda suck and needs fixing so.

zkat avatar Mar 10 '25 21:03 zkat

Probably should just survey existing 2.0 implementations. If they're consistent, it's a bug fix.

pdoane avatar Mar 10 '25 22:03 pdoane