diff --git a/vlib/sokol/f/f_d_use_freetype.v b/vlib/fontstash/a_d_use_freetype.v similarity index 96% rename from vlib/sokol/f/f_d_use_freetype.v rename to vlib/fontstash/a_d_use_freetype.v index 38ff462e7d..849e287ebb 100644 --- a/vlib/sokol/f/f_d_use_freetype.v +++ b/vlib/fontstash/a_d_use_freetype.v @@ -1,4 +1,4 @@ -module f +module fontstash #define FONS_USE_FREETYPE diff --git a/vlib/v/ast/ast.v b/vlib/v/ast/ast.v index 041a94e258..e3e8025d45 100644 --- a/vlib/v/ast/ast.v +++ b/vlib/v/ast/ast.v @@ -765,8 +765,9 @@ pub mut: // #include etc pub struct HashStmt { pub: - mod string - pos token.Position + mod string + pos token.Position + source_file string pub mut: val string // example: 'include # please install openssl // comment' kind string // : 'include' diff --git a/vlib/v/gen/cgen.v b/vlib/v/gen/cgen.v index a8eced4227..ddd26a36c8 100644 --- a/vlib/v/gen/cgen.v +++ b/vlib/v/gen/cgen.v @@ -1165,7 +1165,7 @@ fn (mut g Gen) stmt(node ast.Stmt) { g.includes.writeln(guarded_include) } } else if node.kind == 'define' { - g.includes.writeln('// defined by module `$node.mod`:') + g.includes.writeln('// defined by module `$node.mod` in file `$node.source_file`:') g.includes.writeln('#define $node.main') } } diff --git a/vlib/v/parser/comptime.v b/vlib/v/parser/comptime.v index c05a902b44..86557f8d61 100644 --- a/vlib/v/parser/comptime.v +++ b/vlib/v/parser/comptime.v @@ -33,6 +33,7 @@ fn (mut p Parser) hash() ast.HashStmt { // p.trace('a.v', 'kind: ${kind:-10s} | pos: ${pos:-45s} | hash: $val') return ast.HashStmt{ mod: p.mod + source_file: p.file_name val: val kind: kind main: main_str