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

Cannot use angle brackets for type hints #246

Open
Sword-Smith opened this issue Jan 17, 2024 · 0 comments
Open

Cannot use angle brackets for type hints #246

Sword-Smith opened this issue Jan 17, 2024 · 0 comments
Assignees

Comments

@Sword-Smith
Copy link
Collaborator

I wrote this code:

let asm_annotation_str =
                format!("hint {var_name}: {data_type} = stack[0..{last_stack_for_value_plus_one}]");
            let asm_annotation = triton_asm!({ asm_annotation_str });

Where data_type is Vec<BFieldElement>. This fails with the following error:

called `Result::unwrap()` on an `Err` value: Error(VerboseError { errors: [("hint a: Vec<BFieldElement> = stack[0..1] ", Nom(Eof)), ("hint a: Vec<BFieldElement> = stack[0..1] ", Context("expecting label, instruction or eof"))] })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The assembly parser doesn't allow for angle brackets (> and <) in type names.

@jan-ferdinand jan-ferdinand self-assigned this Jan 19, 2024
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

2 participants