public override bool test(CSsemi.CSemiExp semi) { if (semi[semi.count - 1] != "{") return false; // strip off leading #if(TEST_XYZ) if it's in this semi if (semi.FindFirst("#") != -1) { int loc = semi.FindFirst(")"); for (int i = 0; i <= loc; ++i) semi.remove(0); } // now find function int index = semi.FindFirst("("); if (index > 0 && !isSpecialToken(semi[index - 1])) { CSsemi.CSemiExp local = new CSsemi.CSemiExp(); local.Add("function").Add(semi[index - 1]); doActions(local); return true; } return false; }
public override bool test(CSsemi.CSemiExp semi) { int index = semi.FindFirst("("); if (index>0 && isSpecialToken(semi[index-1])) { CSsemi.CSemiExp local = new CSsemi.CSemiExp(); local.Add("braceless").Add("braceless"); doActions(local); semi.remove(index); test(semi); return true; } return false; }