summary refs log tree commit diff stats
path: root/tests/effects
ModeNameSize
-rw-r--r--teffects1.nim363log stats plain blame
-rw-r--r--teffects2.nim361log stats plain blame
-rw-r--r--teffects3.nim288log stats plain blame
-rw-r--r--teffects4.nim330log stats plain blame
-rw-r--r--teffects5.nim253log stats plain blame
-rw-r--r--teffects6.nim746log stats plain blame
-rw-r--r--teffects7.nim253log stats plain blame
-rw-r--r--teffects8.nim170log stats plain blame
-rw-r--r--tgcsafe.nim506log stats plain blame
-rw-r--r--tgcsafe2.nim238log stats plain blame
-rw-r--r--tgcsafe3.nim466log stats plain blame
-rw-r--r--tsidee1.nim333log stats plain blame
-rw-r--r--tsidee2.nim207log stats plain blame
-rw-r--r--tsidee3.nim270log stats plain blame
-rw-r--r--tsidee4.nim346log stats plain blame
s="w"> getPackage*(conf: ConfigRef; cache: IdentCache; fileIdx: FileIndex): PSym = ## Return a new package symbol. ## ## See Also: ## * `modulegraphs.getPackage` let filename = AbsoluteFile toFullPath(conf, fileIdx) name = getIdent(cache, splitFile(filename).name) info = newLineInfo(fileIdx, 1, 1) pkgName = getPackageName(conf, filename.string) pkgIdent = getIdent(cache, pkgName) newSym(skPackage, pkgIdent, ItemId(module: PackageModuleId, item: int32(fileIdx)), nil, info) func getPackageSymbol*(sym: PSym): PSym = ## Return the owning package symbol. assert sym != nil result = sym while result.kind != skPackage: result = result.owner assert result != nil, repr(sym.info) func getPackageId*(sym: PSym): int = ## Return the owning package ID. sym.getPackageSymbol.id func belongsToProjectPackage*(conf: ConfigRef, sym: PSym): bool = ## Return whether the symbol belongs to the project's package. ## ## See Also: ## * `modulegraphs.belongsToStdlib` conf.mainPackageId == sym.getPackageId