MCPcopy Index your code
hub / github.com/4ian/GDevelop / readType

Method readType

GDevelop.js/scripts/generate-dts.mjs:159–183  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 = '';

Callers 1

generate-dts.mjsFile · 0.80

Calls 3

skipWhitespacesMethod · 0.80
skipUntilMethod · 0.80
readUntilMethod · 0.80

Tested by

no test coverage detected