up: IO     index Zimbu documentation

CLASS IO.CharReaderStack @public

summary

     

A wrapper around a CharReader that supports push().

 
Implements IO.I_CharReader
 
IO.I_CharReader  $reader @file 
list<int>  $stack @file 
 
NEW(reader) @public  Creates a CharReader that reads from reader.
$readChar() int @public  Reads and returns one byte.
$push(c) @public  Push c back, a following readChar() will use it.
 

members (alphabetically)

     

IO.I_CharReader $reader @file

list<int> $stack @file

PROC NEW(IO.I_CharReader reader) @public

     

Creates a CharReader that reads from reader.

PROC $push(int c) @public

     

Push c back, a following readChar() will use it.

Can be used any number of times.

FUNC $readChar() int @public

     

Reads and returns one byte.

Uses a pushed back byte when available. When at the end of the string returns IO.eof.

license

      Copyright 2009 Bram Moolenaar All Rights Reserved.

      Licensed under the Apache License, Version 2.0. See the LICENSE file or obtain a copy at: http://www.apache.org/licenses/LICENSE-2.0