demo

package
Version: v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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