1
0
Fork 0
mirror of https://github.com/pnx/m16vm synced 2026-06-16 03:44:55 +02:00

as/lexer.c: minor style fix.

This commit is contained in:
Henrik Hautakoski 2019-04-03 16:05:55 +02:00
parent c28be46ee3
commit 969c092e6f
No known key found for this signature in database
GPG key ID: 839F3A7EAFAEAFAA

View file

@ -156,19 +156,18 @@ int lexer_get_next(struct lexer *lex) {
lex->lineno++;
switch(ch) {
case EOF : lex->token.type = TOKEN_EOI;
case EOF : lex->token.type = TOKEN_EOI;
break;
case '\n' :
lex->token.type = TOKEN_EOL;
case '\n' : lex->token.type = TOKEN_EOL;
break;
case ',' : lex->token.type = TOKEN_ARG_SEP;
case ',' : lex->token.type = TOKEN_ARG_SEP;
break;
case '$' :
case '$' :
lex->token.type = TOKEN_REG;
if (parse_number(lex) < 0)
return -1;
break;
default:
default :
if (lexer_is_num_start(ch)) {
ungetc(ch, lex->fp);
lex->token.type = TOKEN_NUMBER;