feat(selfhost): multi-file #line paths from Decl.sourceFile
Stamp each merged .bux path onto decls, propagate to HirFunc, and emit #line N \"path\" per function without requiring BUX_DEBUG_FILE. - Decl.sourceFile + Cli_StampSourceFile on merge/project parse - HirFunc.sourceFile; CBE switches currentFile per function - Stdlib and multi-file user packages get distinct paths automatically
This commit is contained in:
@@ -299,6 +299,8 @@ module Ast {
|
||||
isDrop: int, // @[Drop] attribute (0/1)
|
||||
isRelease: int, // @[Release] attribute (0/1)
|
||||
isConst: int, // const func (0/1)
|
||||
// Source file path for #line / diagnostics (multi-file projects)
|
||||
sourceFile: String,
|
||||
// Names
|
||||
strValue: String, // decl name
|
||||
strValue2: String, // interface name, dll name, module path
|
||||
@@ -418,6 +420,7 @@ module Ast {
|
||||
|
||||
func Ast_MakeDecl(kind: int, line: uint32, col: uint32) -> Decl {
|
||||
return Decl { kind: kind, line: line, column: col, isPublic: false,
|
||||
sourceFile: "",
|
||||
isAsync: false, isChecked: 0, isDrop: 0, isRelease: 0, isConst: 0,
|
||||
strValue: "", strValue2: "",
|
||||
typeParam0: "", typeParam1: "", typeParamCount: 0,
|
||||
|
||||
Reference in New Issue
Block a user