Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic group incremental parse erorr in 0.9.4. Works in 0.9.1 and prior #222

Open
rooooooooob opened this issue May 30, 2024 · 1 comment

Comments

@rooooooooob
Copy link

Repro code (on 0.9.4):

let cddl = cddl::parser::cddl_from_str(
    r#"basic = (d: #6.23(uint), e: bytes)
    outer = [a: uint, b: basic, c: "some text"]"#,
    true
)?;

Error:

error: parser errors
  ┌─ input:2:22
  │
2 │ outer = [a: uint, b: basic, c: "some text"]
  │                      ^^^^^ missing definition for rule basic

This parses fine on 0.9.1 and various previous versions (we've had this in a test case for a long time in cddl-codegen).

@rooooooooob
Copy link
Author

Note: it seems to be able to be used in other contexts, for example:

group_choice = [ foo // 0, x: uint // basic ]

does not complain about basic having a missing definition on 0.9.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant