()
| 157 | } |
| 158 | |
| 159 | static readType() { |
| 160 | // Ignore [Const] and such annotations |
| 161 | Parser.skipWhitespaces(); |
| 162 | if (Parser.currentCharacter === '[') Parser.skipUntil(']'); |
| 163 | Parser.skipWhitespaces(); |
| 164 | |
| 165 | // Read the type |
| 166 | /** @type {string} */ |
| 167 | let type; |
| 168 | let optional = false; |
| 169 | let attribute = false; |
| 170 | do { |
| 171 | Parser.skipWhitespaces(); |
| 172 | type = Parser.readUntil(' '); |
| 173 | if (type === 'optional') optional = true; |
| 174 | if (type === 'attribute') attribute = true; |
| 175 | } while ( |
| 176 | type === 'unsigned' || |
| 177 | type === 'optional' || |
| 178 | type === 'attribute' |
| 179 | ); |
| 180 | Parser.skipWhitespaces(); |
| 181 | |
| 182 | return { type, optional, attribute }; |
| 183 | } |
| 184 | |
| 185 | static readIdentifier() { |
| 186 | let name = ''; |
no test coverage detected