Skip to content

parser: macro calls need proper tokens#468

Merged
Kijewski merged 2 commits intoaskama-rs:masterfrom
Kijewski:pr-issue-459
Jun 1, 2025
Merged

parser: macro calls need proper tokens#468
Kijewski merged 2 commits intoaskama-rs:masterfrom
Kijewski:pr-issue-459

Conversation

@Kijewski
Copy link
Copy Markdown
Member

@Kijewski Kijewski commented Jun 1, 2025

With this PR invalid tokens inside a macro call macro_name!(..) are rejected. Otherwise we might emit invalid code that cannot be parsed by rust. Also update fuzzing corpus to include derive.

Resolves #459.
Resolves https://issues.oss-fuzz.com/issues/418896502.

Kijewski added 2 commits June 1, 2025 18:44
With this PR invalid tokens inside a macro call `macro_name!(..)` are
rejected. Otherwise we might emit invalid code that cannot be parsed by
rust.
}

#[test]
#[rustfmt::skip] // FIXME: rustfmt bug <https://github.com/rust-lang/rustfmt/issues/6565>

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note test

Suspicious comment
Comment thread askama_parser/src/expr.rs
@GuillaumeGomez
Copy link
Copy Markdown
Collaborator

Looks all good to me, thanks!

@Kijewski
Copy link
Copy Markdown
Member Author

Kijewski commented Jun 1, 2025

I'm happy to see what more fuzzing errors will be found. :D

@Kijewski Kijewski merged commit 0e30499 into askama-rs:master Jun 1, 2025
41 checks passed
@Kijewski Kijewski deleted the pr-issue-459 branch June 1, 2025 17:14
@Kijewski Kijewski mentioned this pull request Jun 6, 2025
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

Successfully merging this pull request may close these issues.

Illegal macro name emitted and illegal tokens in macros accepted

3 participants