소스 검색

fix fractions in weird bases

master
Martin Dørum 3 년 전
부모
커밋
6f1bd65f67
1개의 변경된 파일1개의 추가작업 그리고 7개의 파일을 삭제
  1. 1
    7
      lib/parse/lex.c

+ 1
- 7
lib/parse/lex.c 파일 보기

@@ -261,12 +261,6 @@ static void read_number(struct l2_lexer *lexer, struct l2_token *tok) {

read_ch(lexer); // '.'

if (!is_numeric(peek_ch(lexer))) {
tok->kind = L2_TOK_ERROR;
tok->v.str = "Trailing dot in number literal";
return;
}

unsigned char buffer[32];
size_t fraction_len = 0;
while (fraction_len < sizeof(buffer)) {
@@ -298,7 +292,7 @@ static void read_number(struct l2_lexer *lexer, struct l2_token *tok) {

if (fraction_len < 1) {
tok->kind = L2_TOK_ERROR;
tok->v.str = "Fraction with no digits";
tok->v.str = "Trailing dot in number literal";
return;
}


Loading…
취소
저장