Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
[autopush] «Vanilla wafer.»
Browse files Browse the repository at this point in the history
  • Loading branch information
metaleap committed Mar 21, 2019
1 parent f7cf97b commit 4fddeb7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions 1990s-fp-corelang/cmd/corelang-dummyrepl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ func main() {
_, _ = os.Stdout.WriteString(" · " + def.Name)
}
}
writeLn("\nand can be evaluated immediately using `!‹name›` or `?‹name›`\n")
writeLn("\n...and can be evaluated immediately using `!‹name›` or `?‹name›`\n")
machine := recompile(mod)

multiline, repl, pprint := "", bufio.NewScanner(os.Stdin), &corelang.SyntaxTreePrinter{}
for repl.Scan() {
if readln := strings.TrimSpace(repl.Text()); readln != "" {
if readln == "" && multiline != "" {
if readln == "..." && multiline != "" {
readln, multiline = strings.TrimSpace(multiline), ""
}
switch {
case strings.HasSuffix(readln, ""):
multiline = readln[:len(readln)-len("")] + "\n "
case strings.HasSuffix(readln, "..."):
multiline = readln[:len(readln)-len("...")] + "\n "
case multiline != "":
multiline += readln + "\n "
case !strings.Contains(readln, "="):
Expand Down

0 comments on commit 4fddeb7

Please sign in to comment.