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:
parent
c28be46ee3
commit
969c092e6f
1 changed files with 5 additions and 6 deletions
11
as/lexer.c
11
as/lexer.c
|
|
@ -156,19 +156,18 @@ int lexer_get_next(struct lexer *lex) {
|
||||||
lex->lineno++;
|
lex->lineno++;
|
||||||
|
|
||||||
switch(ch) {
|
switch(ch) {
|
||||||
case EOF : lex->token.type = TOKEN_EOI;
|
case EOF : lex->token.type = TOKEN_EOI;
|
||||||
break;
|
break;
|
||||||
case '\n' :
|
case '\n' : lex->token.type = TOKEN_EOL;
|
||||||
lex->token.type = TOKEN_EOL;
|
|
||||||
break;
|
break;
|
||||||
case ',' : lex->token.type = TOKEN_ARG_SEP;
|
case ',' : lex->token.type = TOKEN_ARG_SEP;
|
||||||
break;
|
break;
|
||||||
case '$' :
|
case '$' :
|
||||||
lex->token.type = TOKEN_REG;
|
lex->token.type = TOKEN_REG;
|
||||||
if (parse_number(lex) < 0)
|
if (parse_number(lex) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
break;
|
break;
|
||||||
default:
|
default :
|
||||||
if (lexer_is_num_start(ch)) {
|
if (lexer_is_num_start(ch)) {
|
||||||
ungetc(ch, lex->fp);
|
ungetc(ch, lex->fp);
|
||||||
lex->token.type = TOKEN_NUMBER;
|
lex->token.type = TOKEN_NUMBER;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue