v0.3.4 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0



Package demo implements the I/O for running the )demo special command. The script for the demo is in demo.ivy in this directory. Its content is embedded in this source file.



This section is empty.


This section is empty.


func Run

func Run(userInput io.Reader, toIvy io.Writer, output io.Writer) error

Run runs the demo. The arguments are the user's input, a Writer used to deliver text to an ivy interpreter, and a Writer for the output. It assumes that ivy is writing to the same output. Ivy expressions are read from a file (maintained in demo.ivy but embedded in the package). When the user hits a blank line, the next line from the file is delivered to ivy. If the user's input line has text, that is delivered instead and the file does not advance. A nil userInput ignores the user and just runs the script.

func Text

func Text() string

Text returns the input text for the standard demo.


This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL