mergeWith method

Mode mergeWith(
  1. Mode other
)

Creates a new Mode with other's non-null fields taking priority.

Implementation

Mode mergeWith(Mode other) {
  return Mode(
    name: other.name ?? name,
    label: other.label ?? label,
    aliases: other.aliases ?? aliases,
    scope: other.scope ?? scope,
    begin: other.begin ?? begin,
    end: other.end ?? end,
    match: other.match ?? match,
    beginScope: other.beginScope ?? beginScope,
    endScope: other.endScope ?? endScope,
    contains: other.contains ?? contains,
    keywords: other.keywords ?? keywords,
    illegal: other.illegal ?? illegal,
    relevance: other.relevance ?? relevance,
    subLanguage: other.subLanguage ?? subLanguage,
    endsWithParent: other.endsWithParent ?? endsWithParent,
    endsParent: other.endsParent ?? endsParent,
    excludeBegin: other.excludeBegin ?? excludeBegin,
    excludeEnd: other.excludeEnd ?? excludeEnd,
    returnBegin: other.returnBegin ?? returnBegin,
    returnEnd: other.returnEnd ?? returnEnd,
    skip: other.skip ?? skip,
    starts: other.starts ?? starts,
    variants: other.variants ?? variants,
    beginKeywords: other.beginKeywords ?? beginKeywords,
    beforeMatch: other.beforeMatch ?? beforeMatch,
    exports: other.exports ?? exports,
    preprocessor: other.preprocessor ?? preprocessor,
    caseInsensitive: other.caseInsensitive ?? caseInsensitive,
    unicodeRegex: other.unicodeRegex ?? unicodeRegex,
    disableAutodetect: other.disableAutodetect ?? disableAutodetect,
    classNameAliases: other.classNameAliases ?? classNameAliases,
    supersetOf: other.supersetOf ?? supersetOf,
    compilerExtensions: other.compilerExtensions ?? compilerExtensions,
    binary: other.binary ?? binary,
    onBegin: other.onBegin ?? onBegin,
    onEnd: other.onEnd ?? onEnd,
    beforeBeginCallback: other.beforeBeginCallback ?? beforeBeginCallback,
    emitTokens: other.emitTokens ?? emitTokens,
  );
}