Skip to content

Commit

Permalink
Add a flag to print generated locations.
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyalesokhin-starkware committed Jan 30, 2025
1 parent aae16d4 commit 7f0f2db
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/cairo-lang-filesystem/src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,10 @@ pub fn get_originating_location(
mut span: TextSpan,
mut parent_files: Option<&mut Vec<FileId>>,
) -> (FileId, TextSpan) {
if std::env::var("CAIRO_DEBUG_GENERATED_CODE").is_ok() {
return (file_id, span);
}

if let Some(ref mut parent_files) = parent_files {
parent_files.push(file_id);
}
Expand Down

0 comments on commit 7f0f2db

Please sign in to comment.