move asciitables to std/private/ (#16498)

* move asciitables

* minor
This commit is contained in:
flywind
2020-12-29 09:20:47 -06:00
committed by GitHub
parent 89a2390f8b
commit 95f599ca2d
4 changed files with 8 additions and 7 deletions

View File

@@ -29,7 +29,8 @@
## "A GraphFree Approach to DataFlow Analysis" by Markus Mohnen.
## https://link.springer.com/content/pdf/10.1007/3-540-45937-5_6.pdf
import ast, types, intsets, lineinfos, renderer, asciitables
import ast, types, intsets, lineinfos, renderer
import std/private/asciitables
from patterns import sameTrees

View File

@@ -35,7 +35,7 @@ const
debugEchoCode* = defined(nimVMDebug)
when debugEchoCode:
import asciitables
import std/private/asciitables
when hasFFI:
import evalffi

View File

@@ -1,6 +1,6 @@
#[
move to std/asciitables.nim once stable, or to a nimble paackage
once compiler can depend on nimble
move to std/asciitables.nim once stable, or to a fusion package
once compiler can depend on fusion
]#
type Cell* = object
@@ -8,7 +8,7 @@ type Cell* = object
width*, row*, col*, ncols*, nrows*: int
iterator parseTableCells*(s: string, delim = '\t'): Cell =
## iterates over all cells in a `delim`-delimited `s`, after a 1st
## Iterates over all cells in a `delim`-delimited `s`, after a 1st
## pass that computes number of rows, columns, and width of each column.
var widths: seq[int]
var cell: Cell
@@ -69,7 +69,7 @@ iterator parseTableCells*(s: string, delim = '\t'): Cell =
finishRow()
proc alignTable*(s: string, delim = '\t', fill = ' ', sep = " "): string =
## formats a `delim`-delimited `s` representing a table; each cell is aligned
## Formats a `delim`-delimited `s` representing a table; each cell is aligned
## to a width that's computed for each column; consecutive columns are
## delimited by `sep`, and alignment space is filled using `fill`.
## More customized formatting can be done by calling `parseTableCells` directly.

View File

@@ -1,5 +1,5 @@
import stdtest/unittest_light
import compiler/asciitables
import std/private/asciitables
import strformat