Fixed strictFuncs support for std/pegs (#18951)
* Fixed `strictFuncs` support for `std/pegs` Enabled `std/pegs` in the `strictFuncs` import test. Fixes #18057 Fixes #16892 See #18111 * Rebased from `devel` * Conditionally compile `std/pegs` in `koch` This is for supporting `csources` bootstrap. Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
This commit is contained in:
parent
f8d6a53227
commit
19774a72e7
3 changed files with 151 additions and 142 deletions
|
|
@ -1,6 +1,9 @@
|
|||
## Part of 'koch' responsible for the documentation generation.
|
||||
|
||||
import os, strutils, osproc, sets, pathnorm, pegs, sequtils
|
||||
import os, strutils, osproc, sets, pathnorm, sequtils
|
||||
# XXX: Remove this feature check once the csources supports it.
|
||||
when defined(nimHasCastPragmaBlocks):
|
||||
import std/pegs
|
||||
from std/private/globs import nativeToUnixPath, walkDirRecFilter, PathEntry
|
||||
import "../compiler/nimpaths"
|
||||
|
||||
|
|
@ -338,7 +341,9 @@ proc buildDocs*(args: string, localOnly = false, localOutDir = "") =
|
|||
if not localOnly:
|
||||
buildDocsDir(args, webUploadOutput / NimVersion)
|
||||
|
||||
let gaFilter = peg"@( y'--doc.googleAnalytics:' @(\s / $) )"
|
||||
args = args.replace(gaFilter)
|
||||
# XXX: Remove this feature check once the csources supports it.
|
||||
when defined(nimHasCastPragmaBlocks):
|
||||
let gaFilter = peg"@( y'--doc.googleAnalytics:' @(\s / $) )"
|
||||
args = args.replace(gaFilter)
|
||||
|
||||
buildDocsDir(args, localOutDir)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue