"Fossies" - the Fresh Open Source Software Archive

Member "vscode-1.49.1/src/vs/editor/common/modes/abstractMode.ts" (16 Sep 2020, 808 Bytes) of package /linux/misc/vscode-1.49.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /*---------------------------------------------------------------------------------------------
    2  *  Copyright (c) Microsoft Corporation. All rights reserved.
    3  *  Licensed under the MIT License. See License.txt in the project root for license information.
    4  *--------------------------------------------------------------------------------------------*/
    5 
    6 import { IMode, LanguageIdentifier } from 'vs/editor/common/modes';
    7 
    8 export class FrankensteinMode implements IMode {
    9 
   10     private readonly _languageIdentifier: LanguageIdentifier;
   11 
   12     constructor(languageIdentifier: LanguageIdentifier) {
   13         this._languageIdentifier = languageIdentifier;
   14     }
   15 
   16     public getId(): string {
   17         return this._languageIdentifier.language;
   18     }
   19 
   20     public getLanguageIdentifier(): LanguageIdentifier {
   21         return this._languageIdentifier;
   22     }
   23 }