| 1457 | |
| 1458 | |
| 1459 | static int funcname (LexState *ls, expdesc *v) { |
| 1460 | /* funcname -> NAME {fieldsel} [`:' NAME] */ |
| 1461 | int ismethod = 0; |
| 1462 | singlevar(ls, v); |
| 1463 | while (ls->t.token == '.') |
| 1464 | fieldsel(ls, v); |
| 1465 | if (ls->t.token == ':') { |
| 1466 | ismethod = 1; |
| 1467 | fieldsel(ls, v); |
| 1468 | } |
| 1469 | return ismethod; |
| 1470 | } |
| 1471 | |
| 1472 | |
| 1473 | static void funcstat (LexState *ls, int line) { |