You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The extractor should preserve diagnostic metadata so that stack traces point to the source markdown files instead of the extracted files.
When I run lit and look at the output I see
$ ./bin/lit --out-dir out examples/wc.lit
$ grep -n 'Header files to include' examples/wc.lit
37:@{Header files to include}
48:--- Header files to include
$ head -5 out/wc.c
/* wc.c *//* Header files to include */#include<stdio.h>#include<fcntl.h>#include<unistd.h>
but I would like head -6 out/wc.c to show something like
/* wc.c *//* Header files to include */#line 49 "examples/wc.lit"
#include<stdio.h>#include<fcntl.h>#include<unistd.h>
which uses the #line directive to specify the file and line for a section of generated code.
This is C preprocessor specific.
A solution that generalizes to other output languages might require a side-table of line numbers (maybe sourcemap format) that could feed into a language-specific post-processor that
produces a JSR 000045 input for Java files
fixes byte-code line mappings in .pyc files for python
etc.
The text was updated successfully, but these errors were encountered:
The extractor should preserve diagnostic metadata so that stack traces point to the source markdown files instead of the extracted files.
When I run
lit
and look at the output I see$ ./bin/lit --out-dir out examples/wc.lit $ grep -n 'Header files to include' examples/wc.lit 37:@{Header files to include} 48:--- Header files to include $ head -5 out/wc.c
but I would like
head -6 out/wc.c
to show something likewhich uses the
#line
directive to specify the file and line for a section of generated code.This is C preprocessor specific.
A solution that generalizes to other output languages might require a side-table of line numbers (maybe sourcemap format) that could feed into a language-specific post-processor that
.pyc
files for pythonThe text was updated successfully, but these errors were encountered: