ATTRIB -> ['<' Name '>'] */
| 922 | |
| 923 | /* ATTRIB -> ['<' Name '>'] */ |
| 924 | void LuaParser::LocalAttribute() { |
| 925 | auto m = Mark(); |
| 926 | if (TestAndNext('<')) { |
| 927 | auto attributeName = CheckName(); |
| 928 | CheckAndNext('>'); |
| 929 | if (attributeName != "const" && attributeName != "close") { |
| 930 | LuaExpectedError(util::format("unknown attribute {}", attributeName)); |
| 931 | } |
| 932 | m.Complete(*this, LuaSyntaxNodeKind::Attribute); |
| 933 | return; |
| 934 | } |
| 935 | m.Undo(*this); |
| 936 | } |
| 937 | |
| 938 | void LuaParser::Check(LuaTokenKind c) { |
| 939 | if (Current() != c) { |