| 1687 | |
| 1688 | |
| 1689 | static int getlocalattribute (LexState *ls) { |
| 1690 | /* ATTRIB -> ['<' Name '>'] */ |
| 1691 | if (testnext(ls, '<')) { |
| 1692 | const char *attr = getstr(str_checkname(ls)); |
| 1693 | checknext(ls, '>'); |
| 1694 | if (strcmp(attr, "const") == 0) |
| 1695 | return RDKCONST; /* read-only variable */ |
| 1696 | else if (strcmp(attr, "close") == 0) |
| 1697 | return RDKTOCLOSE; /* to-be-closed variable */ |
| 1698 | else |
| 1699 | luaK_semerror(ls, |
| 1700 | luaO_pushfstring(ls->L, "unknown attribute '%s'", attr)); |
| 1701 | } |
| 1702 | return VDKREG; /* regular variable */ |
| 1703 | } |
| 1704 | |
| 1705 | |
| 1706 | static void checktoclose (LexState *ls, int level) { |
no test coverage detected