Skip to content

1.6节关于指针解引用段落修改的建议 #31

@Lumin-exdo

Description

@Lumin-exdo

“还需要注意的是指针解引用(dereference)的识别, ”这一段下方的代码:

if (!make_token(e)) {
  *success = false;
  return 0;
}

/* TODO: Implement code to evaluate the expression. */

for (i = 0; i < nr_token; i ++) {
  if (tokens[i].type == '*' && (i == 0 || tokens[i - 1].type == certain type) ) {
    tokens[i].type = DEREF;
  }
}

return eval(?, ?);

我认为这个for循环不应该放到这里,而应该放到make_token函数体内处理,更有逻辑。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions