Closed Shadow-Silhouette closed 7 months ago
Hi!
Thank you for reporting this issue, we have solved it in the last commit. Now the compiler returns an error indicating that it received an unexpected token and the position of it:
error[P1012]: InvalidToken { location: 130 }
┌─ "prueba.circom":10:5
│
10 │ log("abc
│ ^ here
previous errors were found
Bug Report
Description
When introducing a log statement with a line break to a circuit, the circom compiler panics and does not exit gracefully.
As a user of the circom compiler, I expect the compiler to exit gracefully and provide a meaningful error message.
Example Circuit
bug.circom
Steps to Reproduce
circom ./path/to/bug.circom --r1cs --wasm --sym --c -o ./target/compiled/
make -C ./target/compiled/bug_cpp/
Expected Behavior
Either the compiler should exit gracefully and provide a meaningful error message, or the log statement should be compiled without an error.
Actual Behavior
Error at step 2 (circom compiler):
Error at step 3 (make):
Environment