Skip to content

Commit

Permalink
Merge branch 'main' into progress-bar
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Apr 4, 2024
2 parents 2faaf41 + 458fb89 commit 920e33f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
1 change: 0 additions & 1 deletion src/org/rascalmpl/library/lang/box/util/Box2Text.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ and Eelco Visser (June 30, 1994). The original Box concept was introduced by Joe
The main function `format` maps a Box tree to a `str`:
* To obtain Box terms people typically transform ASTs or ((ParseTree))s to Box using pattern matching in Rascal.
* ((Options)) encode global default options for constraint parameters that only override local parameters if they were elided.
* ((MarkupLanguage)) configures which markup language to use for syntax highlighting purposes.
}
@examples{
This demonstrates the semantics of the main hard constraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,11 @@ test bool selfApplyCurry() {
func = curry(curry, addition);
assert int(int)(int) _ := func;
//assert int(int)(int) _ := func;
func2 = func(1);
assert int(int) _ := func2;
//assert int(int) _ := func2;
return func2(1) == 2;
}
Expand Down
21 changes: 0 additions & 21 deletions src/org/rascalmpl/library/util/Progress.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,6 @@ The total number of steps is the only required parameter to be passed in. All ot
It is inspired on the progressbar described here: https://stackoverflow.com/questions/3173320/text-progress-bar-in-the-console
}
@examples{
```rascal-shell
import util::Progress;
int total = 10;
pb = progressBar(total, length = 15, limit = 100);
for (i <- [0..total]) {
pb.report(" : <i+1> of <total>");
}
pb.finished();
```
}
tuple[void(str) report, void() finished] progressBar(int total, str prefix = "Progress:", int length = 50, int limit = total, str fill = "\u2588", str unfill = "-", str printEnd = "\r") {
limit = limit > total ? total : limit;

Expand All @@ -64,16 +53,6 @@ tuple[void(str) report, void() finished] progressBar(int total, str prefix = "Pr
It returns a function that can be called to make the spinner spin one rotation.
This function takes a `suffix` string parameter that will be displayed behind the spinner
}
@examples{
```rascal-shell
import util::Progress;
import util::Math;
sp = spinner();
while (n := arbInt(100), n != 1) {
sp("<n>");
}
```
}
void (str) spinner(str prefix = " ", str printEnd = "\r") {
int stat = 0;
Expand Down

0 comments on commit 920e33f

Please sign in to comment.