private static int handleLine(int line, int indent, int i, @Nonnull String mappingsText, @Nonnull Deque<Pair<String, String>> currentClass,
	                              @Nonnull IntermediateMappings mappings) throws InvalidMappingException {
		// read next token
		String lineType = mappingsText.substring(i = skipSpace(i, mappingsText), i = readToken(i, mappingsText));
		switch (lineType) {
			case "CLASS" -> {
				updateIndent(currentClass, indent, () -> ("Invalid Enigma mappings, CLASS indent level " + indent + " too deep (expected max. "
						+ currentClass.size() + ", " + currentClass + ") @line " + line + " @char "), i);

				String classNameA = mappingsText.substring(i = skipSpace(i, mappingsText), i = readToken(i, mappingsText));
				classNameA = removeNonePackage(classNameA);
				classNameA = qualifyWithOuterClassesA(currentClass, classNameA);

				String classNameB = mappingsText.substring(i = skipSpace(i, mappingsText), i = readToken(i, mappingsText));
				if (classNameB.isEmpty() || "-".equals(classNameB) || classNameB.startsWith("ACC:")) {
					// no mapping for class, but need to include for context for following members
					classNameB = classNameA;
				} else {
					classNameB = removeNonePackage(classNameB);
					classNameB = qualifyWithOuterClassesB(currentClass, classNameB);
					mappings.addClass(classNameA, classNameB);
				}
				currentClass.push(new Pair<>(classNameA, classNameB));
			}
			case "FIELD" ->
					i = handleClassMemberMapping(line, indent, i, mappingsText, currentClass, "FIELD", mappings::addField);
			case "METHOD" ->
					i = handleClassMemberMapping(line, indent, i, mappingsText, currentClass, "METHOD", mappings::addMethod);
		}
		i = skipLineRest(i, mappingsText);
		return i;
	}
@param line
		Current line number in the mappings file <i>(1 based)</i>
@param indent
		Current level of indentation. Should be equal to or less than the size of the {@code currentClass} {@link Deque}.
@param i
		Current offset into the mappings file.
@param mappingsText
		Mappings file contents.
@param currentClass
		Deque of the current 'context' <i>(what class are we building mappings for)</i>.
@param mappings
		Output mappings.

@return Updated offset into the mappings file.

@throws InvalidMappingException
		When reading the mappings encounters any failure.
recaf-core/src/main/java/software/coley/recaf/services/mapping/format/EnigmaMappings.java