elem_type = ir_type_char;
initializer = create_initializer_compound(slen);
- ir_mode *const mode = get_type_mode(elem_type);
- char const *p = value->begin;
+ ir_mode *const mode = get_type_mode(elem_type);
+ char const *p = value->begin;
for (size_t i = 0; i < slen; ++i) {
ir_tarval *tv = new_tarval_from_long(*p++, mode);
ir_initializer_t *val = create_initializer_tarval(tv);
static inline void next_char(void);
-#define MATCH_NEWLINE(code) \
- case '\r': \
- next_char(); \
- if (c == '\n') { \
- case '\n': \
- next_char(); \
- } \
- lexer_pos.lineno++; \
+#define NEWLINE \
+ '\r': \
+ next_char(); \
+ if (c == '\n') { \
+ case '\n': \
+ next_char(); \
+ } \
+ lexer_pos.lineno++; \
lexer_pos.colno = 1; \
- code
+ goto newline; \
+ newline // Let it look like an ordinary case label.
#define eat(c_type) (assert(c == c_type), next_char())
eat('\\');
switch (c) {
- MATCH_NEWLINE(return;)
+ case NEWLINE:
+ return;
default:
break;
break;
}
- MATCH_NEWLINE(
+ case NEWLINE:
errorf(&lexer_pos, "newline while parsing %s", context);
break;
- )
case EOF:
errorf(&lexer_token.base.source_position, "EOF while parsing %s", context);
}
break;
- MATCH_NEWLINE(break;)
+ case NEWLINE:
+ break;
case EOF: {
errorf(&lexer_token.base.source_position,
next_char();
break;
- MATCH_NEWLINE(
+ case NEWLINE:
lexer_token.kind = '\n';
return;
- )
SYMBOL_CHARS {
parse_symbol();