| 1718 | |
| 1719 | |
| 1720 | static int getlocalattribute (LexState *ls) { |
| 1721 | /* ATTRIB -> ['<' Name '>'] */ |
| 1722 | if (testnext(ls, '<')) { |
| 1723 | const char *attr = getstr(str_checkname(ls)); |
| 1724 | checknext(ls, '>'); |
| 1725 | if (strcmp(attr, "const") == 0) |
| 1726 | return RDKCONST; /* read-only variable */ |
| 1727 | else if (strcmp(attr, "close") == 0) |
| 1728 | return RDKTOCLOSE; /* to-be-closed variable */ |
| 1729 | else |
| 1730 | luaK_semerror(ls, |
| 1731 | luaO_pushfstring(ls->L, "unknown attribute '%s'", attr)); |
| 1732 | } |
| 1733 | return VDKREG; |
| 1734 | } |
| 1735 | |
| 1736 | |
| 1737 | static void checktoclose (LexState *ls, int level) { |
no test coverage detected