language-c-0.3.1: Analysis and generation of C code

Portabilityghc
Stabilityexperimental
Maintainerbenedikt.huber@gmail.com

Language.C.Data.InputStream

Description

Compile time input abstraction for the parser. Supports either ByteString or String.

Synopsis

Documentation

takeChar :: InputStream -> (Char, InputStream)Source

(c,is') = takeChar is reads and removes the first character c from the InputStream is

inputStreamEmpty :: InputStream -> BoolSource

return True if the given input stream is empty

takeChars :: Int -> InputStream -> [Char]Source

str = takeChars n is returns the first n characters of the given input stream, without removing them

countLines :: InputStream -> IntSource

countLines returns the number of text lines in the given InputStream