diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-02-17 23:23:37 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-02-17 23:23:37 -0500 |
| commit | 20b4c6f4973adf52ed3eef57df3aa8d19fef554c (patch) | |
| tree | 087d3f08d2137ae30d9a3c37f406dfbb179bf2e6 /nextlang.c | |
| parent | c678acfb19ae20932d9a1a6d77eea54ed75f545b (diff) | |
Properly quote filename string
Diffstat (limited to 'nextlang.c')
| -rw-r--r-- | nextlang.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -5,8 +5,9 @@ #include <printf.h> #include "ast.h" -#include "parse.h" +#include "builtins/string.h" #include "compile.h" +#include "parse.h" #include "typecheck.h" #include "types.h" @@ -55,7 +56,7 @@ int main(int argc, char *argv[]) bind_statement(env, stmt->ast); } - CORD fileinfo = CORD_asprintf("#line 0 \"%s\"\n", f->filename); + CORD fileinfo = CORD_asprintf("#line 0 %r\n", Str__quoted(f->filename, false)); CORD program = CORD_all( fileinfo, "// Generated code:\n", |
