@Override
	public void decode(Decoder decoder, PcodeFactory pfactory) throws DecoderException {
		String datatypestring = null;
		long id = 0;
		for (;;) {
			int attribId = decoder.getNextAttributeId();
			if (attribId == 0) {
				break;
			}
			if (attribId == ATTRIB_NAME.id()) {	// Name of the structure
				datatypestring = decoder.readString();
			}
			else if (attribId == ATTRIB_ID.id()) {
				id = decoder.readUnsignedInteger();
			}
			else if (attribId == ATTRIB_OFF.id()) {
				offset = (int) decoder.readSignedInteger();
			}
			else if (attribId == ATTRIB_OPREF.id()) {
				int refid = (int) decoder.readUnsignedInteger();
				op = pfactory.getOpRef(refid);
			}
		}
		if (datatypestring != null) {
			datatype = pfactory.getDataTypeManager().findBaseType(datatypestring, id);
		}
		decoder.rewindAttributes();
		super.decode(decoder, pfactory);
	}
@return the byte offset of this field with its structure
Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/ClangFieldToken.java