private void IncreaseNumUseVar(namespace_variable_reference lvr) { VarInfo vi = helper.GetVariable(lvr.var); if (vi == null) { return; } vi.num_use++; vi.act_num_use++; vi.cur_use++; //if (vi.cur_ass == 0 && !lvr.var.name.Contains("$")) helper.AddTempWarning(lvr.var,new UseWithoutAssign(lvr.var.name, lvr.location)); }
private void IncreaseNumAssVar(namespace_variable_reference lvr) { VarInfo vi = helper.GetVariable(lvr.var); if (vi == null) { return; } vi.num_use++; vi.cur_ass++; vi.num_ass++; vi.last_ass_loc = lvr.location; if (vi.last_ass_loc == null) { vi.num_ass--; } if (vi.cur_use > 0) { vi.cur_use--; } }
private void VisitNamespaceVariableReference(namespace_variable_reference en) { IncreaseNumUseVar(en); }