shallowCopy method

Mode shallowCopy()

Implementation

Mode shallowCopy() {
  final copy = Mode(
    name: name,
    label: label,
    aliases: aliases,
    scope: scope,
    begin: begin,
    end: end,
    match: match,
    beginScope: beginScope,
    endScope: endScope,
    contains: contains,
    keywords: keywords,
    illegal: illegal,
    relevance: relevance,
    subLanguage: subLanguage,
    endsWithParent: endsWithParent,
    endsParent: endsParent,
    excludeBegin: excludeBegin,
    excludeEnd: excludeEnd,
    returnBegin: returnBegin,
    returnEnd: returnEnd,
    skip: skip,
    starts: starts,
    variants: variants,
    beginKeywords: beginKeywords,
    beforeMatch: beforeMatch,
    exports: exports,
    preprocessor: preprocessor,
    caseInsensitive: caseInsensitive,
    unicodeRegex: unicodeRegex,
    disableAutodetect: disableAutodetect,
    classNameAliases: classNameAliases,
    supersetOf: supersetOf,
    compilerExtensions: compilerExtensions,
    binary: binary,
    onBegin: onBegin,
    onEnd: onEnd,
    beforeBeginCallback: beforeBeginCallback,
    emitTokens: emitTokens,
  );
  copy.beginRe = beginRe;
  copy.endRe = endRe;
  copy.illegalRe = illegalRe;
  copy.keywordPatternRe = keywordPatternRe;
  copy.matcher = matcher;
  copy.terminatorEnd = terminatorEnd;
  copy.isCompiled = isCompiled;
  copy.cachedVariants = cachedVariants;
  copy.compiledKeywords = compiledKeywords;
  copy.rawDefinition = rawDefinition;
  copy.data = data != null ? Map<String, dynamic>.from(data!) : null;
  return copy;
}