event parser: support \b and \t escape sequences

This commit is contained in:
Felix Krause 2016-03-11 17:58:15 +01:00
parent 5444572543
commit afc5306da5
1 changed files with 2 additions and 0 deletions

View File

@ -49,6 +49,8 @@ proc nextToken(lex: var EventLexer): LexerToken =
of 'n': lex.content.add('\l')
of 'r': lex.content.add('\r')
of '0': lex.content.add('\0')
of 'b': lex.content.add('\b')
of 't': lex.content.add('\t')
of '\\': lex.content.add('\\')
else: raise newException(EventStreamError,
"Unknown escape character: " & lex.buf[lex.bufpos])