Path: blob/main/src/vs/editor/common/viewLayout/linePart.ts
3294 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45export const enum LinePartMetadata {6IS_WHITESPACE = 1,7PSEUDO_BEFORE = 2,8PSEUDO_AFTER = 4,910IS_WHITESPACE_MASK = 0b001,11PSEUDO_BEFORE_MASK = 0b010,12PSEUDO_AFTER_MASK = 0b100,13}1415export class LinePart {16_linePartBrand: void = undefined;1718constructor(19/**20* last char index of this token (not inclusive).21*/22public readonly endIndex: number,23public readonly type: string,24public readonly metadata: number,25public readonly containsRTL: boolean26) { }2728public isWhitespace(): boolean {29return (this.metadata & LinePartMetadata.IS_WHITESPACE_MASK ? true : false);30}3132public isPseudoAfter(): boolean {33return (this.metadata & LinePartMetadata.PSEUDO_AFTER_MASK ? true : false);34}35}363738