[Feat] 增加数学库 std.math

[Fix] 修复resolveModulePath解析二级模块的一些Bug
This commit is contained in:
2025-12-29 17:25:06 +08:00
parent 7565ab7f65
commit cd106fc513
7 changed files with 365 additions and 12 deletions

View File

@@ -1290,6 +1290,20 @@ namespace Fig
if (!fs::exists(modPath))
throw RuntimeError(FString(
std::format("Could not find module `{}`", next.toBasicString())));
if (i == pathVec.size() - 1)
{
// `next` is the last module
modPath = modPath / FString(next + u8".fig").toBasicString();
if (!fs::exists(modPath))
{
throw RuntimeError(FString(
std::format(
"expects {} as parent directory and find next module, but got a file",
next.toBasicString())));
}
found2 = true;
path = modPath;
}
}
if (!found2 && !fs::exists(modPath))