We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error
42 ^ is not a number
I think judgement at_eof() is missing. But I I'm not sure where to judge, yet.
at_eof()
I tried as below. But it doesn't work.
Node *primary() { if (consume('(')) { Node *node = expr(); expect(')'); return node; } + if(at_eof()) return NULL; return new_node_num(expect_number()); }
The text was updated successfully, but these errors were encountered:
it works!! But, I'm not sure how this method works. If at_eof() == True, I guess that this method return nothing.
int expect_number() { + if(!at_eof()){ if (token->kind != TK_NUM) error_at(user_input, token->str, "数ではありません"); int val = token->val; token = token->next; return val; + } }
Sorry, something went wrong.
No branches or pull requests
error
I think judgement
at_eof()
is missing. But I I'm not sure where to judge, yet.I tried as below. But it doesn't work.
Node *primary() { if (consume('(')) { Node *node = expr(); expect(')'); return node; } + if(at_eof()) return NULL; return new_node_num(expect_number()); }
The text was updated successfully, but these errors were encountered: