caas is now drivable through stdin

* added idetools --eval
* streams.readLine recognises and applies the backspace character
This commit is contained in:
Zahary Karadjov 2012-11-15 15:01:52 +02:00
commit 091c1b3075
18 changed files with 176 additions and 137 deletions

View file

@ -180,8 +180,12 @@ proc readLine*(s: PStream): TaintedString =
if c == '\c':
c = readChar(s)
break
elif c == '\L' or c == '\0': break
result.string.add(c)
if c == '\b':
result.string.setLen(result.len - 1)
elif c == '\L' or c == '\0':
break
else:
result.string.add(c)
type
PStringStream* = ref TStringStream ## a stream that encapsulates a string