function parseAttributeTypeReferenceGenericSection()

in src/js/object-mona-parser/object-parser-common.js [51:71]


function parseAttributeTypeReferenceGenericSection() {
  return mona.sequence(function(s) {
    const referencePrefixSpaceSection = s(mona.maybe(mona.spaces()));
    const typeReferenceSection = s(parseAttributeTypeReferenceSection(false));
    const pointerSection = s(mona.maybe(mona.string('*')));
    const pointerSuffixSpaceSection = s(mona.maybe(mona.spaces()));

    const referenceValue =
    (referencePrefixSpaceSection != null ? referencePrefixSpaceSection : '') +
    (typeReferenceSection.typeReference != null ? typeReferenceSection.typeReference : '') +
    typeReferenceSection.suffixSpaces;
    const pointerValue =
    (pointerSection != null ? pointerSection : '') +
    (pointerSuffixSpaceSection != null ? pointerSuffixSpaceSection : '');

    return mona.value({
      text: referenceValue + pointerValue,
      parsedAttributeType: typeReferenceSection,
    });
  });
}