rui314/chibicc

Annotation mistakes in commit ‘Add a tokenizer to allow space characters between tokens’

String10 opened this issue · 0 comments

Maybe there are some mistakes in the annotation in main.c at commit dc036466140c5d7b9d403ef2d77a7eec9113ca16:

// Consumes the current token if it matches `s`.
static bool equal(Token *tok, char *s) {
  ...
}

// Ensure that the current token is `s`.
static Token *skip(Token *tok, char *s) {
  ...
}

I wonder if it should be like this:

// Ensure that the current token is `s`.
static bool equal(Token *tok, char *s) {
  ...
}

// Consumes the current token if it matches `s`.
static Token *skip(Token *tok, char *s) {
  ...
}