void test_tok(void) {
TESTBEGIN("tok");
- assert_tok(" test tokens with line / * + - , ; \\1",
+ assert_tok(" test tokens with line / * + - , ; $1",
{"test", "tokens", "with", "line", "/", "*", "+", "-", ",", ";",
- "\\1", NULL});
+ "$1", NULL});
TESTEND("tok");
}
case '-':
case '*':
case '/':
+ case '\\':
case ULAS_TOK_COMMENT:
// single char tokens
dst->buf[write++] = line[i++];
break;
- case '\\':
+ case '$':
+ // special var for preprocessor
// make sure we have enough space in buffer
ulas_strensr(dst, write + 2);
// escape char tokens