diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/aliases.nim | 7 | ||||
-rw-r--r-- | compiler/nimpaths.nim | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/compiler/aliases.nim b/compiler/aliases.nim index 9ec72faa4..4b50fdb28 100644 --- a/compiler/aliases.nim +++ b/compiler/aliases.nim @@ -77,24 +77,29 @@ proc isPartOf*(a, b: PNode): TAnalysisResult = ## cases: ## ## YES-cases: + ## ``` ## x <| x # for general trees ## x[] <| x ## x[i] <| x ## x.f <| x + ## ``` ## ## NO-cases: + ## ``` ## x !<| y # depending on type and symbol kind ## x[constA] !<| x[constB] ## x.f !<| x.g ## x.f !<| y.f iff x !<= y + ## ``` ## ## MAYBE-cases: ## + ## ``` ## x[] ?<| y[] iff compatible type ## ## ## x[] ?<| y depending on type - ## + ## ``` if a.kind == b.kind: case a.kind of nkSym: diff --git a/compiler/nimpaths.nim b/compiler/nimpaths.nim index c6e188289..3756f956b 100644 --- a/compiler/nimpaths.nim +++ b/compiler/nimpaths.nim @@ -9,7 +9,7 @@ specialpaths is simpler because it doesn't need variables to be relocatable at runtime (eg for use in testament) interpolation variables: - $nimr: such that `$nimr/lib/system.nim` exists (avoids confusion with $nim binary) +: $nimr: such that `$nimr/lib/system.nim` exists (avoids confusion with $nim binary) in compiler, it's obtainable via getPrefixDir(); for other tools (eg koch), this could be getCurrentDir() or getAppFilename().parentDir.parentDir, depending on use case |