src/vs/editor/standalone/common/monarch/monarchLexer.ts/MonarchTokenizer/getLoadStatus
class MonarchTokenizer:	public getLoadStatus(): ILoadStatus {
		let promises: Thenable<any>[] = [];
		for (let nestedModeId in this._embeddedModes) {
			const tokenizationSupport = modes.TokenizationRegistry.get(nestedModeId);
			if (tokenizationSupport) {
				// The nested mode is already loaded
				if (tokenizationSupport instanceof MonarchTokenizer) {
					const nestedModeStatus = tokenizationSupport.getLoadStatus();
					if (nestedModeStatus.loaded === false) {
						promises.push(nestedModeStatus.promise);
					}
				}
				continue;
			}

			const tokenizationSupportPromise = modes.TokenizationRegistry.getPromise(nestedModeId);
			if (tokenizationSupportPromise) {
				// The nested mode is in the process of being loaded
				promises.push(tokenizationSupportPromise);
			}
		}

		if (promises.length === 0) {
			return {
				loaded: true
			};
		}
		return {
			loaded: false,
			promise: Promise.all(promises).then(_ => undefined)
		};
	}