monaco-editor11 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +0 -7
- package/dist/monaco-editor11.es.js +0 -49
- package/dist/monaco-editor11.umd.js +1 -1
- package/dist/workers/_.contribution.js +120 -0
- package/dist/workers/abap.contribution.js +8 -0
- package/dist/workers/abap.js +1397 -0
- package/dist/workers/abstractCodeEditorService.js +129 -0
- package/dist/workers/abstractKeybindingService.js +286 -0
- package/dist/workers/abstractScrollbar.js +214 -0
- package/dist/workers/abstractSyntaxTokenBackend.js +128 -0
- package/dist/workers/abstractText.js +89 -0
- package/dist/workers/abstractTree.js +2027 -0
- package/dist/workers/accessibility.js +11 -0
- package/dist/workers/accessibilityService.js +111 -0
- package/dist/workers/accessibilitySignalService.js +331 -0
- package/dist/workers/accessibleDiffViewer.js +588 -0
- package/dist/workers/accessibleViewRegistry.js +25 -0
- package/dist/workers/action.js +15 -0
- package/dist/workers/actionCommonCategories.js +16 -0
- package/dist/workers/actionList.js +344 -0
- package/dist/workers/actionViewItemService.js +29 -0
- package/dist/workers/actionViewItems.js +376 -0
- package/dist/workers/actionWidget.js +236 -0
- package/dist/workers/actionbar.js +462 -0
- package/dist/workers/actions.js +483 -0
- package/dist/workers/anchorSelect.js +160 -0
- package/dist/workers/animation.js +74 -0
- package/dist/workers/apex.contribution.js +9 -0
- package/dist/workers/apex.js +329 -0
- package/dist/workers/aria.js +84 -0
- package/dist/workers/arrays.js +529 -0
- package/dist/workers/arraysFind.js +177 -0
- package/dist/workers/assert.js +79 -0
- package/dist/workers/ast.js +485 -0
- package/dist/workers/async.js +938 -0
- package/dist/workers/asyncDataTree.js +946 -0
- package/dist/workers/autoIndent.js +390 -0
- package/dist/workers/autorun.js +89 -0
- package/dist/workers/autorunImpl.js +215 -0
- package/dist/workers/azcli.contribution.js +8 -0
- package/dist/workers/azcli.js +67 -0
- package/dist/workers/bannerController.js +118 -0
- package/dist/workers/base.js +19 -0
- package/dist/workers/baseColors.js +31 -0
- package/dist/workers/baseObservable.js +106 -0
- package/dist/workers/baseRenderStrategy.js +19 -0
- package/dist/workers/baseResolvedKeybinding.js +56 -0
- package/dist/workers/bat.contribution.js +8 -0
- package/dist/workers/bat.js +99 -0
- package/dist/workers/beforeEditPositionMapper.js +110 -0
- package/dist/workers/bicep.contribution.js +8 -0
- package/dist/workers/bicep.js +108 -0
- package/dist/workers/blockCommentCommand.js +149 -0
- package/dist/workers/blockDecorations.js +97 -0
- package/dist/workers/bracketMatching.js +359 -0
- package/dist/workers/bracketPairsImpl.js +717 -0
- package/dist/workers/bracketPairsTree.js +343 -0
- package/dist/workers/bracketSelections.js +149 -0
- package/dist/workers/brackets.js +108 -0
- package/dist/workers/browser.js +57 -0
- package/dist/workers/buffer.js +81 -0
- package/dist/workers/bufferDirtyTracker.js +45 -0
- package/dist/workers/bulkEditService.js +76 -0
- package/dist/workers/button.js +226 -0
- package/dist/workers/cache.js +61 -0
- package/dist/workers/cameligo.contribution.js +8 -0
- package/dist/workers/cameligo.js +173 -0
- package/dist/workers/canIUse.js +23 -0
- package/dist/workers/cancellation.js +116 -0
- package/dist/workers/caretOperations.js +48 -0
- package/dist/workers/changeRecorder.js +78 -0
- package/dist/workers/changeTracker.js +80 -0
- package/dist/workers/charWidthReader.js +104 -0
- package/dist/workers/characterClassifier.js +59 -0
- package/dist/workers/characterPair.js +40 -0
- package/dist/workers/chartsColors.js +18 -0
- package/dist/workers/clickLinkGesture.js +161 -0
- package/dist/workers/clipboard.js +308 -0
- package/dist/workers/clipboardService.js +9 -0
- package/dist/workers/clipboardUtils.js +85 -0
- package/dist/workers/clojure.contribution.js +8 -0
- package/dist/workers/clojure.js +760 -0
- package/dist/workers/codeAction.js +306 -0
- package/dist/workers/codeActionCommands.js +230 -0
- package/dist/workers/codeActionContributions.js +55 -0
- package/dist/workers/codeActionController.js +372 -0
- package/dist/workers/codeActionKeybindingResolver.js +90 -0
- package/dist/workers/codeActionMenu.js +68 -0
- package/dist/workers/codeActionModel.js +334 -0
- package/dist/workers/codeEditorContributions.js +132 -0
- package/dist/workers/codeEditorService.js +9 -0
- package/dist/workers/codeEditorWidget.js +1856 -0
- package/dist/workers/codeLensCache.js +112 -0
- package/dist/workers/codelens.js +114 -0
- package/dist/workers/codelensController.js +469 -0
- package/dist/workers/codelensWidget.js +265 -0
- package/dist/workers/codicons.js +50 -0
- package/dist/workers/codiconsLibrary.js +642 -0
- package/dist/workers/codiconsUtil.js +22 -0
- package/dist/workers/coffee.contribution.js +9 -0
- package/dist/workers/coffee.js +231 -0
- package/dist/workers/collections.js +98 -0
- package/dist/workers/color.js +94 -0
- package/dist/workers/colorDetector.js +245 -0
- package/dist/workers/colorPickerBody.js +71 -0
- package/dist/workers/colorPickerCloseButton.js +34 -0
- package/dist/workers/colorPickerContribution.js +50 -0
- package/dist/workers/colorPickerHeader.js +79 -0
- package/dist/workers/colorPickerInsertButton.js +27 -0
- package/dist/workers/colorPickerModel.js +74 -0
- package/dist/workers/colorPickerParticipantUtils.js +52 -0
- package/dist/workers/colorPickerSaturationBox.js +106 -0
- package/dist/workers/colorPickerStrip.js +98 -0
- package/dist/workers/colorPickerWidget.js +32 -0
- package/dist/workers/colorUtils.js +199 -0
- package/dist/workers/colorizedBracketPairsDecorationProvider.js +97 -0
- package/dist/workers/colorizer.js +120 -0
- package/dist/workers/colors.js +20 -0
- package/dist/workers/columnRange.js +35 -0
- package/dist/workers/combineTextEditInfos.js +124 -0
- package/dist/workers/commandIds.js +12 -0
- package/dist/workers/commands.js +329 -0
- package/dist/workers/commandsQuickAccess.js +40 -0
- package/dist/workers/comment.js +147 -0
- package/dist/workers/common.js +20 -0
- package/dist/workers/comparers.js +87 -0
- package/dist/workers/completionModel.js +227 -0
- package/dist/workers/compressedObjectTreeModel.js +385 -0
- package/dist/workers/computeGhostText.js +182 -0
- package/dist/workers/computeMovedLines.js +249 -0
- package/dist/workers/concat23Trees.js +192 -0
- package/dist/workers/configuration.js +92 -0
- package/dist/workers/configurationModels.js +614 -0
- package/dist/workers/configurationRegistry.js +400 -0
- package/dist/workers/configurations.js +46 -0
- package/dist/workers/consoleObservableLogger.js +83 -0
- package/dist/workers/constObservable.js +35 -0
- package/dist/workers/contentHoverComputer.js +71 -0
- package/dist/workers/contentHoverController.js +320 -0
- package/dist/workers/contentHoverRendered.js +336 -0
- package/dist/workers/contentHoverStatusBar.js +52 -0
- package/dist/workers/contentHoverTypes.js +29 -0
- package/dist/workers/contentHoverWidget.js +394 -0
- package/dist/workers/contentHoverWidgetWrapper.js +362 -0
- package/dist/workers/contentSegmenter.js +52 -0
- package/dist/workers/contentWidgets.js +495 -0
- package/dist/workers/contextKeyService.js +468 -0
- package/dist/workers/contextMenuHandler.js +126 -0
- package/dist/workers/contextMenuService.js +103 -0
- package/dist/workers/contextScopedHistoryWidget.js +106 -0
- package/dist/workers/contextViewService.js +73 -0
- package/dist/workers/contextkey.js +1551 -0
- package/dist/workers/contextkeys.js +21 -0
- package/dist/workers/contextmenu.js +334 -0
- package/dist/workers/contextview.js +298 -0
- package/dist/workers/contiguousMultilineTokens.js +32 -0
- package/dist/workers/contiguousMultilineTokensBuilder.js +23 -0
- package/dist/workers/contiguousTokensEditing.js +128 -0
- package/dist/workers/contiguousTokensStore.js +207 -0
- package/dist/workers/contribution.js +36 -0
- package/dist/workers/coordinatesConverter.js +51 -0
- package/dist/workers/copyLinesCommand.js +73 -0
- package/dist/workers/copyPasteContribution.js +114 -0
- package/dist/workers/copyPasteController.js +585 -0
- package/dist/workers/copySelection.js +47 -0
- package/dist/workers/coreCommands.js +1731 -0
- package/dist/workers/countBadge.js +52 -0
- package/dist/workers/cpp.contribution.js +14 -0
- package/dist/workers/cpp.js +388 -0
- package/dist/workers/csharp.contribution.js +8 -0
- package/dist/workers/csharp.js +325 -0
- package/dist/workers/csp.contribution.js +8 -0
- package/dist/workers/csp.js +52 -0
- package/dist/workers/css.contribution.js +9 -0
- package/dist/workers/css.js +184 -0
- package/dist/workers/cssMode.js +198 -0
- package/dist/workers/cssValue.js +69 -0
- package/dist/workers/cssWorker.js +183 -0
- package/dist/workers/currentLineHighlight.js +205 -0
- package/dist/workers/cursor.js +899 -0
- package/dist/workers/cursorAtomicMoveOperations.js +145 -0
- package/dist/workers/cursorCollection.js +194 -0
- package/dist/workers/cursorColumnSelection.js +93 -0
- package/dist/workers/cursorColumns.js +112 -0
- package/dist/workers/cursorCommon.js +250 -0
- package/dist/workers/cursorContext.js +15 -0
- package/dist/workers/cursorDeleteOperations.js +231 -0
- package/dist/workers/cursorMoveCommands.js +676 -0
- package/dist/workers/cursorMoveOperations.js +290 -0
- package/dist/workers/cursorTypeEditOperations.js +968 -0
- package/dist/workers/cursorTypeOperations.js +173 -0
- package/dist/workers/cursorUndo.js +133 -0
- package/dist/workers/cursorUtils.js +75 -0
- package/dist/workers/cursorWordOperations.js +720 -0
- package/dist/workers/cypher.contribution.js +8 -0
- package/dist/workers/cypher.js +262 -0
- package/dist/workers/dart.contribution.js +9 -0
- package/dist/workers/dart.js +280 -0
- package/dist/workers/dataChannel.js +12 -0
- package/dist/workers/dataTransfer.js +80 -0
- package/dist/workers/dataTree.js +20 -0
- package/dist/workers/date.js +57 -0
- package/dist/workers/debugLocation.js +66 -0
- package/dist/workers/debugName.js +110 -0
- package/dist/workers/debuggerRpc.js +67 -0
- package/dist/workers/decorationCssRuleExtractor.js +73 -0
- package/dist/workers/decorationStyleCache.js +40 -0
- package/dist/workers/decorations.js +196 -0
- package/dist/workers/decorationsOverviewRuler.js +416 -0
- package/dist/workers/decorators.js +33 -0
- package/dist/workers/defaultDocumentColorProvider.js +55 -0
- package/dist/workers/defaultDocumentColorsComputer.js +138 -0
- package/dist/workers/defaultLinesDiffComputer.js +188 -0
- package/dist/workers/defaultProviders.js +230 -0
- package/dist/workers/defaultStyles.js +194 -0
- package/dist/workers/delegatingEditorImpl.js +111 -0
- package/dist/workers/derived.js +80 -0
- package/dist/workers/derivedImpl.js +353 -0
- package/dist/workers/descriptors.js +13 -0
- package/dist/workers/devToolsLogger.js +442 -0
- package/dist/workers/dialogs.js +5 -0
- package/dist/workers/diff.js +902 -0
- package/dist/workers/diffAlgorithm.js +139 -0
- package/dist/workers/diffChange.js +34 -0
- package/dist/workers/diffEditor.contribution.js +83 -0
- package/dist/workers/diffEditor.js +38 -0
- package/dist/workers/diffEditorDecorations.js +115 -0
- package/dist/workers/diffEditorEditors.js +190 -0
- package/dist/workers/diffEditorItemTemplate.js +272 -0
- package/dist/workers/diffEditorOptions.js +152 -0
- package/dist/workers/diffEditorSash.js +86 -0
- package/dist/workers/diffEditorViewModel.js +608 -0
- package/dist/workers/diffEditorViewZones.js +525 -0
- package/dist/workers/diffEditorWidget.js +590 -0
- package/dist/workers/diffProviderFactoryService.js +142 -0
- package/dist/workers/dnd.js +198 -0
- package/dist/workers/dockerfile.contribution.js +9 -0
- package/dist/workers/dockerfile.js +129 -0
- package/dist/workers/documentSemanticTokens.js +362 -0
- package/dist/workers/documentSymbols.js +24 -0
- package/dist/workers/dom.js +1454 -0
- package/dist/workers/domFontInfo.js +28 -0
- package/dist/workers/domLineBreaksComputer.js +301 -0
- package/dist/workers/domReadingContext.js +43 -0
- package/dist/workers/domSanitize.js +312 -0
- package/dist/workers/domStylesheets.js +145 -0
- package/dist/workers/dompurify.js +1347 -0
- package/dist/workers/dragAndDropCommand.js +65 -0
- package/dist/workers/dragScrolling.js +174 -0
- package/dist/workers/dropIntoEditorContribution.js +41 -0
- package/dist/workers/dropIntoEditorController.js +173 -0
- package/dist/workers/dropdown.js +141 -0
- package/dist/workers/dropdownActionViewItem.js +109 -0
- package/dist/workers/dynamicProgrammingDiffing.js +101 -0
- package/dist/workers/dynamicViewOverlay.js +10 -0
- package/dist/workers/ecl.contribution.js +8 -0
- package/dist/workers/ecl.js +455 -0
- package/dist/workers/edcore.main.js +74 -0
- package/dist/workers/edit.js +83 -0
- package/dist/workers/editContext.js +10 -0
- package/dist/workers/editContextFactory.js +16 -0
- package/dist/workers/editOperation.js +36 -0
- package/dist/workers/editStack.js +363 -0
- package/dist/workers/editor.all.js +65 -0
- package/dist/workers/editor.api.js +2 -0
- package/dist/workers/editor.api2.js +60 -0
- package/dist/workers/editor.js +15 -0
- package/dist/workers/editor.main.js +170 -0
- package/dist/workers/editor.worker.start.js +44 -0
- package/dist/workers/editorAction.js +26 -0
- package/dist/workers/editorBaseApi.js +43 -0
- package/dist/workers/editorBrowser.js +53 -0
- package/dist/workers/editorColorRegistry.js +102 -0
- package/dist/workers/editorColors.js +128 -0
- package/dist/workers/editorCommon.js +13 -0
- package/dist/workers/editorConfiguration.js +292 -0
- package/dist/workers/editorConfigurationSchema.js +338 -0
- package/dist/workers/editorContextKeys.js +84 -0
- package/dist/workers/editorDom.js +299 -0
- package/dist/workers/editorExtensions.js +489 -0
- package/dist/workers/editorFeatures.js +17 -0
- package/dist/workers/editorGutter.js +117 -0
- package/dist/workers/editorMarkdownCodeBlockRenderer.js +85 -0
- package/dist/workers/editorNavigationQuickAccess.js +152 -0
- package/dist/workers/editorOptions.js +3440 -0
- package/dist/workers/editorScrollbar.js +151 -0
- package/dist/workers/editorState.js +115 -0
- package/dist/workers/editorTheme.js +23 -0
- package/dist/workers/editorWebWorker.js +299 -0
- package/dist/workers/editorWorker.js +9 -0
- package/dist/workers/editorWorkerHost.js +15 -0
- package/dist/workers/editorWorkerService.js +366 -0
- package/dist/workers/editorZoom.js +26 -0
- package/dist/workers/electricCharacter.js +55 -0
- package/dist/workers/elementSizeObserver.js +107 -0
- package/dist/workers/elixir.contribution.js +8 -0
- package/dist/workers/elixir.js +568 -0
- package/dist/workers/embeddedCodeEditorWidget.js +66 -0
- package/dist/workers/encodedTokenAttributes.js +79 -0
- package/dist/workers/enterAction.js +53 -0
- package/dist/workers/environment.js +5 -0
- package/dist/workers/eolCounter.js +44 -0
- package/dist/workers/equals.js +84 -0
- package/dist/workers/errorMessage.js +71 -0
- package/dist/workers/errors.js +163 -0
- package/dist/workers/event.js +1197 -0
- package/dist/workers/extensions.js +18 -0
- package/dist/workers/extpath.js +147 -0
- package/dist/workers/fastDomNode.js +255 -0
- package/dist/workers/files.js +19 -0
- package/dist/workers/filters.js +742 -0
- package/dist/workers/findController.js +970 -0
- package/dist/workers/findDecorations.js +311 -0
- package/dist/workers/findInput.js +294 -0
- package/dist/workers/findInputToggles.js +52 -0
- package/dist/workers/findModel.js +497 -0
- package/dist/workers/findOptionsWidget.js +155 -0
- package/dist/workers/findSectionHeaders.js +128 -0
- package/dist/workers/findState.js +244 -0
- package/dist/workers/findWidget.js +1168 -0
- package/dist/workers/findWidgetSearchHistory.js +85 -0
- package/dist/workers/fixBrackets.js +67 -0
- package/dist/workers/fixedArray.js +70 -0
- package/dist/workers/floatingMenu.contribution.js +9 -0
- package/dist/workers/floatingMenu.js +94 -0
- package/dist/workers/flow9.contribution.js +8 -0
- package/dist/workers/flow9.js +141 -0
- package/dist/workers/folding.js +1136 -0
- package/dist/workers/foldingDecorations.js +158 -0
- package/dist/workers/foldingModel.js +532 -0
- package/dist/workers/foldingRanges.js +354 -0
- package/dist/workers/fontInfo.js +172 -0
- package/dist/workers/fontInfoFromSettings.js +29 -0
- package/dist/workers/fontMeasurements.js +206 -0
- package/dist/workers/fontZoom.js +47 -0
- package/dist/workers/fonts.js +17 -0
- package/dist/workers/format.js +367 -0
- package/dist/workers/formatActions.js +263 -0
- package/dist/workers/formattedTextRenderer.js +160 -0
- package/dist/workers/formattingEdit.js +57 -0
- package/dist/workers/forwardingTelemetryService.js +60 -0
- package/dist/workers/freemarker2.contribution.js +52 -0
- package/dist/workers/freemarker2.js +1062 -0
- package/dist/workers/fsharp.contribution.js +8 -0
- package/dist/workers/fsharp.js +216 -0
- package/dist/workers/fullFileRenderStrategy.js +414 -0
- package/dist/workers/fullFileRenderStrategy.wgsl.js +93 -0
- package/dist/workers/functional.js +24 -0
- package/dist/workers/fuzzyScorer.js +143 -0
- package/dist/workers/getHover.js +56 -0
- package/dist/workers/getIconClasses.js +106 -0
- package/dist/workers/getLinks.js +157 -0
- package/dist/workers/getPositionOffsetTransformerFromTextModel.js +24 -0
- package/dist/workers/getSemanticTokens.js +211 -0
- package/dist/workers/ghostText.js +111 -0
- package/dist/workers/ghostTextView.js +449 -0
- package/dist/workers/glob.js +581 -0
- package/dist/workers/globalPointerMoveMonitor.js +83 -0
- package/dist/workers/glyphHoverComputer.js +40 -0
- package/dist/workers/glyphHoverController.js +171 -0
- package/dist/workers/glyphHoverWidget.js +184 -0
- package/dist/workers/glyphLanesModel.js +61 -0
- package/dist/workers/glyphMargin.js +403 -0
- package/dist/workers/glyphRasterizer.js +276 -0
- package/dist/workers/go.contribution.js +8 -0
- package/dist/workers/go.js +217 -0
- package/dist/workers/goToCommands.js +694 -0
- package/dist/workers/goToDefinitionAtPosition.js +267 -0
- package/dist/workers/goToSymbol.js +128 -0
- package/dist/workers/gotoError.js +272 -0
- package/dist/workers/gotoErrorWidget.js +352 -0
- package/dist/workers/gotoLineQuickAccess.js +183 -0
- package/dist/workers/gotoSymbolQuickAccess.js +395 -0
- package/dist/workers/gpuActions.js +126 -0
- package/dist/workers/gpuDisposable.js +48 -0
- package/dist/workers/gpuMark.js +80 -0
- package/dist/workers/gpuUtils.js +58 -0
- package/dist/workers/graph.js +74 -0
- package/dist/workers/graphql.contribution.js +9 -0
- package/dist/workers/graphql.js +150 -0
- package/dist/workers/guidesTextModelPart.js +405 -0
- package/dist/workers/gutterFeature.js +238 -0
- package/dist/workers/gutterIndicatorMenu.js +252 -0
- package/dist/workers/gutterIndicatorView.js +456 -0
- package/dist/workers/handlebars.contribution.js +9 -0
- package/dist/workers/handlebars.js +485 -0
- package/dist/workers/hash.js +256 -0
- package/dist/workers/hcl.contribution.js +8 -0
- package/dist/workers/hcl.js +182 -0
- package/dist/workers/helpQuickAccess.js +77 -0
- package/dist/workers/heuristicSequenceOptimizations.js +374 -0
- package/dist/workers/hiddenRangeModel.js +126 -0
- package/dist/workers/hideUnchangedRegionsFeature.js +433 -0
- package/dist/workers/hierarchicalKind.js +26 -0
- package/dist/workers/highlightDecorations.js +111 -0
- package/dist/workers/highlightedLabel.js +129 -0
- package/dist/workers/history.js +85 -0
- package/dist/workers/historyWidgetKeybindingHint.js +9 -0
- package/dist/workers/horizontalScrollbar.js +91 -0
- package/dist/workers/hotReloadHelpers.js +17 -0
- package/dist/workers/hover.js +11 -0
- package/dist/workers/hoverAccessibleViews.js +8 -0
- package/dist/workers/hoverActionIds.js +23 -0
- package/dist/workers/hoverActions.js +424 -0
- package/dist/workers/hoverColorPicker.js +14 -0
- package/dist/workers/hoverColorPickerContribution.js +44 -0
- package/dist/workers/hoverColorPickerParticipant.js +151 -0
- package/dist/workers/hoverContribution.js +56 -0
- package/dist/workers/hoverCopyButton.js +54 -0
- package/dist/workers/hoverDelegate2.js +39 -0
- package/dist/workers/hoverDelegateFactory.js +34 -0
- package/dist/workers/hoverOperation.js +168 -0
- package/dist/workers/hoverParticipant.js +161 -0
- package/dist/workers/hoverService.js +542 -0
- package/dist/workers/hoverTypes.js +64 -0
- package/dist/workers/hoverUtils.js +18 -0
- package/dist/workers/hoverWidget.js +93 -0
- package/dist/workers/html.contribution.js +9 -0
- package/dist/workers/html.js +374 -0
- package/dist/workers/htmlContent.js +164 -0
- package/dist/workers/htmlMode.js +213 -0
- package/dist/workers/htmlWorker.js +126 -0
- package/dist/workers/iPadShowKeyboard.js +74 -0
- package/dist/workers/iconLabel.js +291 -0
- package/dist/workers/iconLabels.js +33 -0
- package/dist/workers/iconRegistry.js +183 -0
- package/dist/workers/iconsStyleSheet.js +75 -0
- package/dist/workers/idGenerator.js +16 -0
- package/dist/workers/iframe.js +87 -0
- package/dist/workers/ime.js +33 -0
- package/dist/workers/inPlaceReplace.js +151 -0
- package/dist/workers/inPlaceReplaceCommand.js +27 -0
- package/dist/workers/indentGuides.js +254 -0
- package/dist/workers/indentRangeProvider.js +166 -0
- package/dist/workers/indentRules.js +63 -0
- package/dist/workers/indentUtils.js +33 -0
- package/dist/workers/indentation.js +100 -0
- package/dist/workers/indentationGuesser.js +178 -0
- package/dist/workers/indentationLineProcessor.js +193 -0
- package/dist/workers/index.js +21 -0
- package/dist/workers/indexTreeModel.js +538 -0
- package/dist/workers/ini.contribution.js +9 -0
- package/dist/workers/ini.js +70 -0
- package/dist/workers/initialize.js +11 -0
- package/dist/workers/inlayHints.js +147 -0
- package/dist/workers/inlayHintsContribution.js +11 -0
- package/dist/workers/inlayHintsController.js +686 -0
- package/dist/workers/inlayHintsHover.js +162 -0
- package/dist/workers/inlayHintsLocations.js +96 -0
- package/dist/workers/inlineCompletionContextKeys.js +23 -0
- package/dist/workers/inlineCompletions.contribution.js +31 -0
- package/dist/workers/inlineCompletionsAccessibleView.js +4 -0
- package/dist/workers/inlineCompletionsController.js +427 -0
- package/dist/workers/inlineCompletionsHintsWidget.js +356 -0
- package/dist/workers/inlineCompletionsModel.js +1048 -0
- package/dist/workers/inlineCompletionsService.js +170 -0
- package/dist/workers/inlineCompletionsSource.js +548 -0
- package/dist/workers/inlineCompletionsView.js +86 -0
- package/dist/workers/inlineDecorations.js +26 -0
- package/dist/workers/inlineDiffDeletedCodeMargin.js +138 -0
- package/dist/workers/inlineEdit.js +17 -0
- package/dist/workers/inlineEditWithChanges.js +30 -0
- package/dist/workers/inlineEditsCollapsedView.js +132 -0
- package/dist/workers/inlineEditsCustomView.js +256 -0
- package/dist/workers/inlineEditsDeletionView.js +178 -0
- package/dist/workers/inlineEditsInsertionView.js +267 -0
- package/dist/workers/inlineEditsLineReplacementView.js +329 -0
- package/dist/workers/inlineEditsModel.js +59 -0
- package/dist/workers/inlineEditsNewUsers.js +174 -0
- package/dist/workers/inlineEditsSideBySideView.js +517 -0
- package/dist/workers/inlineEditsView.js +561 -0
- package/dist/workers/inlineEditsViewInterface.js +21 -0
- package/dist/workers/inlineEditsViewProducer.js +119 -0
- package/dist/workers/inlineEditsWordReplacementView.js +211 -0
- package/dist/workers/inlineProgress.js +139 -0
- package/dist/workers/inlineSuggestionItem.js +497 -0
- package/dist/workers/inplaceReplaceSupport.js +87 -0
- package/dist/workers/inputBox.js +510 -0
- package/dist/workers/inputColors.js +66 -0
- package/dist/workers/inputMode.js +22 -0
- package/dist/workers/insertFinalNewLine.js +32 -0
- package/dist/workers/insertFinalNewLineCommand.js +39 -0
- package/dist/workers/inspectTokens.js +240 -0
- package/dist/workers/instantiation.js +44 -0
- package/dist/workers/instantiationService.js +403 -0
- package/dist/workers/intervalTree.js +1002 -0
- package/dist/workers/iterator.js +186 -0
- package/dist/workers/java.contribution.js +9 -0
- package/dist/workers/java.js +231 -0
- package/dist/workers/javascript.contribution.js +11 -0
- package/dist/workers/javascript.js +70 -0
- package/dist/workers/jsonContributionRegistry.js +42 -0
- package/dist/workers/jsonMode.js +224 -0
- package/dist/workers/jsonWorker.js +187 -0
- package/dist/workers/julia.contribution.js +8 -0
- package/dist/workers/julia.js +510 -0
- package/dist/workers/keyCodes.js +351 -0
- package/dist/workers/keybinding.js +9 -0
- package/dist/workers/keybindingCancellation.js +81 -0
- package/dist/workers/keybindingLabel.js +122 -0
- package/dist/workers/keybindingLabels.js +139 -0
- package/dist/workers/keybindingResolver.js +304 -0
- package/dist/workers/keybindings.js +104 -0
- package/dist/workers/keybindingsRegistry.js +111 -0
- package/dist/workers/keyboardEvent.js +125 -0
- package/dist/workers/korean.js +321 -0
- package/dist/workers/kotlin.contribution.js +9 -0
- package/dist/workers/kotlin.js +251 -0
- package/dist/workers/label.js +5 -0
- package/dist/workers/labels.js +15 -0
- package/dist/workers/language.js +9 -0
- package/dist/workers/languageBracketsConfiguration.js +133 -0
- package/dist/workers/languageConfiguration.js +138 -0
- package/dist/workers/languageConfigurationRegistry.js +361 -0
- package/dist/workers/languageFeatureDebounce.js +137 -0
- package/dist/workers/languageFeatureRegistry.js +180 -0
- package/dist/workers/languageFeatures.js +9 -0
- package/dist/workers/languageFeaturesService.js +47 -0
- package/dist/workers/languageSelector.js +112 -0
- package/dist/workers/languageService.js +92 -0
- package/dist/workers/languages.js +522 -0
- package/dist/workers/languagesAssociations.js +193 -0
- package/dist/workers/languagesRegistry.js +237 -0
- package/dist/workers/layoutService.js +9 -0
- package/dist/workers/lazy.js +49 -0
- package/dist/workers/lazyObservableValue.js +125 -0
- package/dist/workers/legacyLinesDiffComputer.js +468 -0
- package/dist/workers/length.js +129 -0
- package/dist/workers/less.contribution.js +9 -0
- package/dist/workers/less.js +160 -0
- package/dist/workers/lexon.contribution.js +8 -0
- package/dist/workers/lexon.js +156 -0
- package/dist/workers/lib.index.js +103 -0
- package/dist/workers/lib.js +1107 -0
- package/dist/workers/lifecycle.js +311 -0
- package/dist/workers/lightBulbWidget.js +427 -0
- package/dist/workers/lineCommentCommand.js +328 -0
- package/dist/workers/lineDecorations.js +208 -0
- package/dist/workers/lineEdit.js +75 -0
- package/dist/workers/lineHeights.js +370 -0
- package/dist/workers/lineNumbers.js +184 -0
- package/dist/workers/linePart.js +25 -0
- package/dist/workers/lineRange.js +312 -0
- package/dist/workers/lineSelection.js +36 -0
- package/dist/workers/lineSequence.js +36 -0
- package/dist/workers/lineTokens.js +405 -0
- package/dist/workers/linesDecorations.js +104 -0
- package/dist/workers/linesDiffComputer.js +29 -0
- package/dist/workers/linesDiffComputers.js +13 -0
- package/dist/workers/linesLayout.js +765 -0
- package/dist/workers/linesOperations.js +1187 -0
- package/dist/workers/linesSliceCharSequence.js +205 -0
- package/dist/workers/link.js +95 -0
- package/dist/workers/linkComputer.js +269 -0
- package/dist/workers/linkedEditing.js +381 -0
- package/dist/workers/linkedList.js +126 -0
- package/dist/workers/linkedText.js +48 -0
- package/dist/workers/links.js +376 -0
- package/dist/workers/liquid.contribution.js +9 -0
- package/dist/workers/liquid.js +306 -0
- package/dist/workers/list.js +11 -0
- package/dist/workers/listColors.js +51 -0
- package/dist/workers/listPaging.js +128 -0
- package/dist/workers/listService.js +1025 -0
- package/dist/workers/listView.js +1173 -0
- package/dist/workers/listWidget.js +1535 -0
- package/dist/workers/log.js +271 -0
- package/dist/workers/logService.js +40 -0
- package/dist/workers/logging.js +86 -0
- package/dist/workers/longLinesHelper.js +23 -0
- package/dist/workers/lspLanguageFeatures.js +716 -0
- package/dist/workers/lua.contribution.js +8 -0
- package/dist/workers/lua.js +161 -0
- package/dist/workers/m3.contribution.js +8 -0
- package/dist/workers/m3.js +209 -0
- package/dist/workers/map.js +670 -0
- package/dist/workers/margin.js +71 -0
- package/dist/workers/marginDecorations.js +84 -0
- package/dist/workers/markdown.contribution.js +8 -0
- package/dist/workers/markdown.js +228 -0
- package/dist/workers/markdownHoverParticipant.js +419 -0
- package/dist/workers/markdownRenderer.js +73 -0
- package/dist/workers/marked.js +2478 -0
- package/dist/workers/markerDecorations.js +9 -0
- package/dist/workers/markerDecorationsService.js +248 -0
- package/dist/workers/markerHoverParticipant.js +270 -0
- package/dist/workers/markerNavigationService.js +223 -0
- package/dist/workers/markerService.js +330 -0
- package/dist/workers/markers.js +127 -0
- package/dist/workers/marshalling.js +62 -0
- package/dist/workers/mdx.contribution.js +8 -0
- package/dist/workers/mdx.js +230 -0
- package/dist/workers/menu.js +1147 -0
- package/dist/workers/menuColors.js +19 -0
- package/dist/workers/menuEntryActionViewItem.js +519 -0
- package/dist/workers/menuService.js +436 -0
- package/dist/workers/messageController.js +186 -0
- package/dist/workers/middleScroll.contribution.js +8 -0
- package/dist/workers/middleScrollController.js +128 -0
- package/dist/workers/migrateOptions.js +220 -0
- package/dist/workers/mime.js +11 -0
- package/dist/workers/minimap.js +1662 -0
- package/dist/workers/minimapCharRenderer.js +90 -0
- package/dist/workers/minimapCharRendererFactory.js +136 -0
- package/dist/workers/minimapCharSheet.js +25 -0
- package/dist/workers/minimapColors.js +23 -0
- package/dist/workers/minimapPreBaked.js +52 -0
- package/dist/workers/minimapTokensColorTracker.js +58 -0
- package/dist/workers/mips.contribution.js +9 -0
- package/dist/workers/mips.js +197 -0
- package/dist/workers/mirrorTextModel.js +117 -0
- package/dist/workers/miscColors.js +32 -0
- package/dist/workers/model.js +9 -0
- package/dist/workers/modelLineProjection.js +350 -0
- package/dist/workers/modelLineProjectionData.js +297 -0
- package/dist/workers/modelService.js +413 -0
- package/dist/workers/modesRegistry.js +75 -0
- package/dist/workers/monaco.contribution.js +302 -0
- package/dist/workers/monarchCommon.js +147 -0
- package/dist/workers/monarchCompile.js +546 -0
- package/dist/workers/monarchLexer.js +764 -0
- package/dist/workers/monospaceLineBreaksComputer.js +473 -0
- package/dist/workers/mouseCursor.js +9 -0
- package/dist/workers/mouseEvent.js +153 -0
- package/dist/workers/mouseHandler.js +539 -0
- package/dist/workers/mouseTarget.js +978 -0
- package/dist/workers/moveCaretCommand.js +49 -0
- package/dist/workers/moveLinesCommand.js +394 -0
- package/dist/workers/movedBlocksLinesFeature.js +277 -0
- package/dist/workers/msdax.contribution.js +8 -0
- package/dist/workers/msdax.js +374 -0
- package/dist/workers/multiDiffEditorWidget.js +43 -0
- package/dist/workers/multiDiffEditorWidgetImpl.js +427 -0
- package/dist/workers/multicursor.js +1004 -0
- package/dist/workers/myersDiffAlgorithm.js +159 -0
- package/dist/workers/mysql.contribution.js +8 -0
- package/dist/workers/mysql.js +877 -0
- package/dist/workers/nativeEditContext.js +518 -0
- package/dist/workers/nativeEditContextRegistry.js +23 -0
- package/dist/workers/nativeEditContextUtils.js +85 -0
- package/dist/workers/navigator.js +36 -0
- package/dist/workers/network.js +267 -0
- package/dist/workers/nls.js +76 -0
- package/dist/workers/nls.messages.js +18 -0
- package/dist/workers/nodeReader.js +127 -0
- package/dist/workers/normalization.js +41 -0
- package/dist/workers/notification.js +9 -0
- package/dist/workers/nullTokenize.js +29 -0
- package/dist/workers/numbers.js +45 -0
- package/dist/workers/objectCollectionBuffer.js +102 -0
- package/dist/workers/objectPool.js +47 -0
- package/dist/workers/objectTree.js +204 -0
- package/dist/workers/objectTreeModel.js +220 -0
- package/dist/workers/objective-c.contribution.js +8 -0
- package/dist/workers/objective-c.js +182 -0
- package/dist/workers/objects.js +152 -0
- package/dist/workers/observableCodeEditor.js +373 -0
- package/dist/workers/observableFromEvent.js +123 -0
- package/dist/workers/observableSignal.js +47 -0
- package/dist/workers/observableSignalFromEvent.js +41 -0
- package/dist/workers/observableValue.js +105 -0
- package/dist/workers/observableValueOpts.js +20 -0
- package/dist/workers/offsetRange.js +225 -0
- package/dist/workers/onEnter.js +109 -0
- package/dist/workers/oneCursor.js +117 -0
- package/dist/workers/opener.js +43 -0
- package/dist/workers/openerService.js +222 -0
- package/dist/workers/originalEditorInlineDiffView.js +215 -0
- package/dist/workers/outlineModel.js +265 -0
- package/dist/workers/overlayWidgets.js +181 -0
- package/dist/workers/overviewRuler.js +134 -0
- package/dist/workers/overviewRulerFeature.js +168 -0
- package/dist/workers/overviewZoneManager.js +176 -0
- package/dist/workers/parameterHints.js +126 -0
- package/dist/workers/parameterHintsModel.js +258 -0
- package/dist/workers/parameterHintsWidget.js +318 -0
- package/dist/workers/parser.js +121 -0
- package/dist/workers/pascal.contribution.js +9 -0
- package/dist/workers/pascal.js +250 -0
- package/dist/workers/pascaligo.contribution.js +8 -0
- package/dist/workers/pascaligo.js +163 -0
- package/dist/workers/path.js +1451 -0
- package/dist/workers/peekView.js +246 -0
- package/dist/workers/performance.js +222 -0
- package/dist/workers/perl.contribution.js +8 -0
- package/dist/workers/perl.js +625 -0
- package/dist/workers/pgsql.contribution.js +8 -0
- package/dist/workers/pgsql.js +850 -0
- package/dist/workers/php.contribution.js +9 -0
- package/dist/workers/php.js +499 -0
- package/dist/workers/pickerQuickAccess.js +271 -0
- package/dist/workers/pieceTreeBase.js +1473 -0
- package/dist/workers/pieceTreeTextBuffer.js +461 -0
- package/dist/workers/pieceTreeTextBufferBuilder.js +140 -0
- package/dist/workers/pixelRatio.js +88 -0
- package/dist/workers/pla.contribution.js +7 -0
- package/dist/workers/pla.js +136 -0
- package/dist/workers/placeholderText.contribution.js +14 -0
- package/dist/workers/placeholderTextContribution.js +77 -0
- package/dist/workers/platform.js +32 -0
- package/dist/workers/platformObservableUtils.js +31 -0
- package/dist/workers/point.js +50 -0
- package/dist/workers/pointerHandler.js +132 -0
- package/dist/workers/position.js +142 -0
- package/dist/workers/positionToOffset.js +17 -0
- package/dist/workers/positionToOffsetImpl.js +98 -0
- package/dist/workers/postEditWidget.js +220 -0
- package/dist/workers/postiats.contribution.js +8 -0
- package/dist/workers/postiats.js +906 -0
- package/dist/workers/powerquery.contribution.js +8 -0
- package/dist/workers/powerquery.js +889 -0
- package/dist/workers/powershell.contribution.js +8 -0
- package/dist/workers/powershell.js +238 -0
- package/dist/workers/prefixSumComputer.js +226 -0
- package/dist/workers/process.js +61 -0
- package/dist/workers/product.js +70 -0
- package/dist/workers/productService.js +9 -0
- package/dist/workers/progress.js +16 -0
- package/dist/workers/progressbar.js +105 -0
- package/dist/workers/promise.js +56 -0
- package/dist/workers/protobuf.contribution.js +8 -0
- package/dist/workers/protobuf.js +419 -0
- package/dist/workers/provideInlineCompletions.js +372 -0
- package/dist/workers/provideSignatureHelp.js +59 -0
- package/dist/workers/pug.contribution.js +8 -0
- package/dist/workers/pug.js +401 -0
- package/dist/workers/python.contribution.js +9 -0
- package/dist/workers/python.js +366 -0
- package/dist/workers/qsharp.contribution.js +8 -0
- package/dist/workers/qsharp.js +300 -0
- package/dist/workers/quickAccess.js +56 -0
- package/dist/workers/quickInput.js +108 -0
- package/dist/workers/quickInputActions.js +189 -0
- package/dist/workers/quickInputBox.js +104 -0
- package/dist/workers/quickInputController.js +901 -0
- package/dist/workers/quickInputDelegate.js +19 -0
- package/dist/workers/quickInputList.js +1391 -0
- package/dist/workers/quickInputService.js +197 -0
- package/dist/workers/quickInputTree.js +37 -0
- package/dist/workers/quickInputTreeAccessibilityProvider.js +39 -0
- package/dist/workers/quickInputTreeController.js +181 -0
- package/dist/workers/quickInputTreeFilter.js +42 -0
- package/dist/workers/quickInputTreeRenderer.js +141 -0
- package/dist/workers/quickInputTreeSorter.js +48 -0
- package/dist/workers/quickInputUtils.js +89 -0
- package/dist/workers/quickpickColors.js +21 -0
- package/dist/workers/r.contribution.js +8 -0
- package/dist/workers/r.js +242 -0
- package/dist/workers/range.js +421 -0
- package/dist/workers/rangeMap.js +161 -0
- package/dist/workers/rangeMapping.js +229 -0
- package/dist/workers/rangeSingleLine.js +17 -0
- package/dist/workers/rangeUtil.js +117 -0
- package/dist/workers/razor.contribution.js +9 -0
- package/dist/workers/razor.js +616 -0
- package/dist/workers/rbTreeBase.js +362 -0
- package/dist/workers/rect.js +163 -0
- package/dist/workers/rectangleRenderer.js +214 -0
- package/dist/workers/rectangleRenderer.wgsl.js +68 -0
- package/dist/workers/redis.contribution.js +8 -0
- package/dist/workers/redis.js +301 -0
- package/dist/workers/redshift.contribution.js +8 -0
- package/dist/workers/redshift.js +808 -0
- package/dist/workers/reducer.js +46 -0
- package/dist/workers/referencesController.js +382 -0
- package/dist/workers/referencesModel.js +241 -0
- package/dist/workers/referencesTree.js +200 -0
- package/dist/workers/referencesWidget.js +525 -0
- package/dist/workers/registrations.contribution.js +82 -0
- package/dist/workers/rename.js +458 -0
- package/dist/workers/renameWidget.js +741 -0
- package/dist/workers/renderLines.js +185 -0
- package/dist/workers/renderingContext.js +118 -0
- package/dist/workers/replaceAllCommand.js +54 -0
- package/dist/workers/replaceCommand.js +158 -0
- package/dist/workers/replaceInput.js +176 -0
- package/dist/workers/replacePattern.js +289 -0
- package/dist/workers/replaceWidgetHistory.js +85 -0
- package/dist/workers/resizable.js +150 -0
- package/dist/workers/resizableContentWidget.js +92 -0
- package/dist/workers/resolvedKeybindingItem.js +35 -0
- package/dist/workers/resolverService.js +5 -0
- package/dist/workers/resources.js +231 -0
- package/dist/workers/restructuredtext.contribution.js +8 -0
- package/dist/workers/restructuredtext.js +173 -0
- package/dist/workers/revertButtonsFeature.js +149 -0
- package/dist/workers/rgba.js +35 -0
- package/dist/workers/richEditBrackets.js +356 -0
- package/dist/workers/rowCache.js +110 -0
- package/dist/workers/rpc.js +57 -0
- package/dist/workers/ruby.contribution.js +9 -0
- package/dist/workers/ruby.js +510 -0
- package/dist/workers/rulers.js +82 -0
- package/dist/workers/rulersGpu.js +66 -0
- package/dist/workers/runOnChange.js +61 -0
- package/dist/workers/rust.contribution.js +8 -0
- package/dist/workers/rust.js +342 -0
- package/dist/workers/sash.js +451 -0
- package/dist/workers/sb.contribution.js +8 -0
- package/dist/workers/sb.js +114 -0
- package/dist/workers/scala.contribution.js +9 -0
- package/dist/workers/scala.js +369 -0
- package/dist/workers/scanner.js +287 -0
- package/dist/workers/scheme.contribution.js +8 -0
- package/dist/workers/scheme.js +107 -0
- package/dist/workers/screenReaderContentRich.js +337 -0
- package/dist/workers/screenReaderContentSimple.js +194 -0
- package/dist/workers/screenReaderSupport.js +175 -0
- package/dist/workers/screenReaderUtils.js +111 -0
- package/dist/workers/scrollDecoration.js +70 -0
- package/dist/workers/scrollable.js +323 -0
- package/dist/workers/scrollableElement.js +603 -0
- package/dist/workers/scrollbarArrow.js +78 -0
- package/dist/workers/scrollbarState.js +163 -0
- package/dist/workers/scrollbarVisibilityController.js +93 -0
- package/dist/workers/scss.contribution.js +9 -0
- package/dist/workers/scss.js +259 -0
- package/dist/workers/search.js +52 -0
- package/dist/workers/searchColors.js +13 -0
- package/dist/workers/sectionHeaders.js +179 -0
- package/dist/workers/selectBox.js +47 -0
- package/dist/workers/selectBoxCustom.js +858 -0
- package/dist/workers/selectBoxNative.js +142 -0
- package/dist/workers/selection.js +145 -0
- package/dist/workers/selections.js +338 -0
- package/dist/workers/semanticTokensConfig.js +14 -0
- package/dist/workers/semanticTokensDto.js +82 -0
- package/dist/workers/semanticTokensProviderStyling.js +263 -0
- package/dist/workers/semanticTokensStyling.js +9 -0
- package/dist/workers/semanticTokensStylingService.js +47 -0
- package/dist/workers/serviceCollection.js +22 -0
- package/dist/workers/severity.js +52 -0
- package/dist/workers/severityIcon.js +29 -0
- package/dist/workers/shell.contribution.js +8 -0
- package/dist/workers/shell.js +220 -0
- package/dist/workers/shiftCommand.js +241 -0
- package/dist/workers/singleTextEditHelpers.js +32 -0
- package/dist/workers/smallImmutableSet.js +108 -0
- package/dist/workers/smartSelect.js +281 -0
- package/dist/workers/snippetController2.js +297 -0
- package/dist/workers/snippetParser.js +890 -0
- package/dist/workers/snippetSession.js +650 -0
- package/dist/workers/snippetVariables.js +323 -0
- package/dist/workers/solidity.contribution.js +8 -0
- package/dist/workers/solidity.js +1366 -0
- package/dist/workers/sophia.contribution.js +8 -0
- package/dist/workers/sophia.js +198 -0
- package/dist/workers/sortLinesCommand.js +81 -0
- package/dist/workers/sparql.contribution.js +8 -0
- package/dist/workers/sparql.js +200 -0
- package/dist/workers/sparseMultilineTokens.js +548 -0
- package/dist/workers/sparseTokensStore.js +210 -0
- package/dist/workers/splice.js +14 -0
- package/dist/workers/splitview.js +829 -0
- package/dist/workers/sql.contribution.js +8 -0
- package/dist/workers/sql.js +852 -0
- package/dist/workers/st.contribution.js +8 -0
- package/dist/workers/st.js +415 -0
- package/dist/workers/stableEditorScroll.js +52 -0
- package/dist/workers/standaloneCodeEditor.js +335 -0
- package/dist/workers/standaloneCodeEditorService.js +96 -0
- package/dist/workers/standaloneColorPickerActions.js +81 -0
- package/dist/workers/standaloneColorPickerController.js +62 -0
- package/dist/workers/standaloneColorPickerParticipant.js +117 -0
- package/dist/workers/standaloneColorPickerWidget.js +215 -0
- package/dist/workers/standaloneCommandsQuickAccess.js +82 -0
- package/dist/workers/standaloneEditor.js +519 -0
- package/dist/workers/standaloneEnums.js +1017 -0
- package/dist/workers/standaloneGotoLineQuickAccess.js +67 -0
- package/dist/workers/standaloneGotoSymbolQuickAccess.js +77 -0
- package/dist/workers/standaloneHelpQuickAccess.js +14 -0
- package/dist/workers/standaloneLanguages.js +621 -0
- package/dist/workers/standaloneLayoutService.js +74 -0
- package/dist/workers/standaloneQuickInputService.js +150 -0
- package/dist/workers/standaloneReferenceSearch.js +38 -0
- package/dist/workers/standaloneServices.js +787 -0
- package/dist/workers/standaloneStrings.js +42 -0
- package/dist/workers/standaloneTheme.js +9 -0
- package/dist/workers/standaloneThemeService.js +367 -0
- package/dist/workers/standaloneTreeSitterLibraryService.js +23 -0
- package/dist/workers/standaloneWebWorker.js +55 -0
- package/dist/workers/stickyScrollActions.js +132 -0
- package/dist/workers/stickyScrollContribution.js +16 -0
- package/dist/workers/stickyScrollController.js +566 -0
- package/dist/workers/stickyScrollElement.js +39 -0
- package/dist/workers/stickyScrollModelProvider.js +338 -0
- package/dist/workers/stickyScrollProvider.js +197 -0
- package/dist/workers/stickyScrollWidget.js +474 -0
- package/dist/workers/stopwatch.js +30 -0
- package/dist/workers/storage.js +200 -0
- package/dist/workers/stringBuilder.js +122 -0
- package/dist/workers/stringEdit.js +165 -0
- package/dist/workers/strings.js +834 -0
- package/dist/workers/structuredLogger.js +56 -0
- package/dist/workers/suggest.js +322 -0
- package/dist/workers/suggestAlternatives.js +95 -0
- package/dist/workers/suggestCommitCharacters.js +59 -0
- package/dist/workers/suggestController.js +941 -0
- package/dist/workers/suggestInlineCompletions.js +193 -0
- package/dist/workers/suggestMemory.js +254 -0
- package/dist/workers/suggestModel.js +667 -0
- package/dist/workers/suggestOvertypingCapturer.js +62 -0
- package/dist/workers/suggestWidget.js +890 -0
- package/dist/workers/suggestWidgetAdapter.js +210 -0
- package/dist/workers/suggestWidgetDetails.js +393 -0
- package/dist/workers/suggestWidgetRenderer.js +208 -0
- package/dist/workers/suggestWidgetStatus.js +74 -0
- package/dist/workers/supports.js +58 -0
- package/dist/workers/surroundSelectionCommand.js +44 -0
- package/dist/workers/swift.contribution.js +9 -0
- package/dist/workers/swift.js +311 -0
- package/dist/workers/symbolIcons.js +101 -0
- package/dist/workers/symbolNavigation.js +178 -0
- package/dist/workers/symbols.js +10 -0
- package/dist/workers/syntaxRangeProvider.js +177 -0
- package/dist/workers/systemverilog.contribution.js +14 -0
- package/dist/workers/systemverilog.js +575 -0
- package/dist/workers/tabFocus.js +29 -0
- package/dist/workers/tableWidget.js +181 -0
- package/dist/workers/taskQueue.js +116 -0
- package/dist/workers/tcl.contribution.js +8 -0
- package/dist/workers/tcl.js +231 -0
- package/dist/workers/telemetry.js +9 -0
- package/dist/workers/ternarySearchTree.js +674 -0
- package/dist/workers/textAreaEditContext.js +720 -0
- package/dist/workers/textAreaEditContextInput.js +588 -0
- package/dist/workers/textAreaEditContextState.js +160 -0
- package/dist/workers/textChange.js +248 -0
- package/dist/workers/textEdit.js +269 -0
- package/dist/workers/textLength.js +87 -0
- package/dist/workers/textModel.js +2031 -0
- package/dist/workers/textModelBracketPairs.js +45 -0
- package/dist/workers/textModelDefaults.js +18 -0
- package/dist/workers/textModelEditSource.js +166 -0
- package/dist/workers/textModelEvents.js +216 -0
- package/dist/workers/textModelGuides.js +40 -0
- package/dist/workers/textModelPart.js +23 -0
- package/dist/workers/textModelSearch.js +455 -0
- package/dist/workers/textModelStringEdit.js +11 -0
- package/dist/workers/textModelSync.impl.js +307 -0
- package/dist/workers/textModelText.js +26 -0
- package/dist/workers/textModelTokens.js +436 -0
- package/dist/workers/textResourceConfiguration.js +6 -0
- package/dist/workers/textToHtmlTokenizer.js +139 -0
- package/dist/workers/textualHighlightProvider.js +78 -0
- package/dist/workers/textureAtlas.js +179 -0
- package/dist/workers/textureAtlasPage.js +110 -0
- package/dist/workers/textureAtlasShelfAllocator.js +129 -0
- package/dist/workers/textureAtlasSlabAllocator.js +346 -0
- package/dist/workers/tfIdf.js +179 -0
- package/dist/workers/themables.js +100 -0
- package/dist/workers/theme.js +110 -0
- package/dist/workers/themeService.js +67 -0
- package/dist/workers/themes.js +242 -0
- package/dist/workers/toggle.js +242 -0
- package/dist/workers/toggleHighContrast.js +35 -0
- package/dist/workers/toggleTabFocusMode.js +42 -0
- package/dist/workers/tokenStore.js +407 -0
- package/dist/workers/tokenWithTextArray.js +73 -0
- package/dist/workers/tokenization.js +29 -0
- package/dist/workers/tokenizationRegistry.js +123 -0
- package/dist/workers/tokenizationTextModelPart.js +275 -0
- package/dist/workers/tokenizer.js +301 -0
- package/dist/workers/tokenizerSyntaxTokenBackend.js +261 -0
- package/dist/workers/toolbar.js +244 -0
- package/dist/workers/touch.js +270 -0
- package/dist/workers/transaction.js +109 -0
- package/dist/workers/transpose.js +65 -0
- package/dist/workers/tree.js +45 -0
- package/dist/workers/treeSitterLibraryService.js +9 -0
- package/dist/workers/treeSitterSyntaxTokenBackend.js +167 -0
- package/dist/workers/treeSitterThemeService.js +9 -0
- package/dist/workers/treeSitterTokenizationImpl.js +713 -0
- package/dist/workers/treeSitterTree.js +395 -0
- package/dist/workers/treeViewsDnd.js +24 -0
- package/dist/workers/treeViewsDndService.js +12 -0
- package/dist/workers/triggerInlineEditCommandsRegistry.js +18 -0
- package/dist/workers/trimTrailingWhitespaceCommand.js +98 -0
- package/dist/workers/trustedTypes.js +29 -0
- package/dist/workers/tsMode.js +212 -0
- package/dist/workers/tsWorker.js +352 -0
- package/dist/workers/twig.contribution.js +9 -0
- package/dist/workers/twig.js +391 -0
- package/dist/workers/types.js +144 -0
- package/dist/workers/typescript.contribution.js +11 -0
- package/dist/workers/typescript.js +408 -0
- package/dist/workers/typescriptServices.js +210154 -0
- package/dist/workers/typescriptServicesMetadata.js +3 -0
- package/dist/workers/typespec.contribution.js +8 -0
- package/dist/workers/typespec.js +126 -0
- package/dist/workers/typingSpeed.js +165 -0
- package/dist/workers/uint.js +24 -0
- package/dist/workers/undoRedo.js +43 -0
- package/dist/workers/undoRedoService.js +1076 -0
- package/dist/workers/unicodeHighlighter.js +673 -0
- package/dist/workers/unicodeTextModelHighlighter.js +188 -0
- package/dist/workers/unusualLineTerminators.js +113 -0
- package/dist/workers/updatableHoverWidget.js +107 -0
- package/dist/workers/uri.js +606 -0
- package/dist/workers/usLayoutResolvedKeybinding.js +175 -0
- package/dist/workers/utils.js +209 -0
- package/dist/workers/utilsCancellation.js +63 -0
- package/dist/workers/uuid.js +53 -0
- package/dist/workers/validation.js +159 -0
- package/dist/workers/vb.contribution.js +8 -0
- package/dist/workers/vb.js +371 -0
- package/dist/workers/verticalScrollbar.js +94 -0
- package/dist/workers/view.js +720 -0
- package/dist/workers/viewContext.js +22 -0
- package/dist/workers/viewController.js +274 -0
- package/dist/workers/viewCursor.js +218 -0
- package/dist/workers/viewCursors.js +339 -0
- package/dist/workers/viewEventHandler.js +186 -0
- package/dist/workers/viewEvents.js +180 -0
- package/dist/workers/viewGpuContext.js +241 -0
- package/dist/workers/viewLayer.js +478 -0
- package/dist/workers/viewLayout.js +368 -0
- package/dist/workers/viewLine.js +544 -0
- package/dist/workers/viewLineOptions.js +43 -0
- package/dist/workers/viewLineRenderer.js +948 -0
- package/dist/workers/viewLines.js +721 -0
- package/dist/workers/viewLinesGpu.js +571 -0
- package/dist/workers/viewLinesViewportData.js +30 -0
- package/dist/workers/viewModel.js +98 -0
- package/dist/workers/viewModelDecoration.js +55 -0
- package/dist/workers/viewModelDecorations.js +132 -0
- package/dist/workers/viewModelEventDispatcher.js +398 -0
- package/dist/workers/viewModelImpl.js +1163 -0
- package/dist/workers/viewModelLines.js +938 -0
- package/dist/workers/viewOverlays.js +204 -0
- package/dist/workers/viewPart.js +49 -0
- package/dist/workers/viewUserInputEvents.js +91 -0
- package/dist/workers/viewZones.js +335 -0
- package/dist/workers/viewportRenderStrategy.js +316 -0
- package/dist/workers/viewportSemanticTokens.js +166 -0
- package/dist/workers/webWorker.js +396 -0
- package/dist/workers/webWorkerBootstrap.js +20 -0
- package/dist/workers/webWorkerFactory.js +171 -0
- package/dist/workers/wgsl.contribution.js +8 -0
- package/dist/workers/wgsl.js +452 -0
- package/dist/workers/whitespace.js +277 -0
- package/dist/workers/widget.js +44 -0
- package/dist/workers/window.js +60 -0
- package/dist/workers/wordCharacterClassifier.js +87 -0
- package/dist/workers/wordContextKey.js +69 -0
- package/dist/workers/wordDistance.js +64 -0
- package/dist/workers/wordHelper.js +127 -0
- package/dist/workers/wordHighlighter.js +796 -0
- package/dist/workers/wordOperations.js +442 -0
- package/dist/workers/wordPartOperations.js +145 -0
- package/dist/workers/wordSelections.js +82 -0
- package/dist/workers/workerManager.js +147 -0
- package/dist/workers/workers.js +141 -0
- package/dist/workers/workspace.js +84 -0
- package/dist/workers/workspaceTrust.js +9 -0
- package/dist/workers/wrapInHotClass.js +41 -0
- package/dist/workers/wrapInReloadableClass.js +35 -0
- package/dist/workers/xml.contribution.js +28 -0
- package/dist/workers/xml.js +160 -0
- package/dist/workers/yaml.contribution.js +9 -0
- package/dist/workers/yaml.js +271 -0
- package/dist/workers/zoneWidget.js +406 -0
- package/package.json +2 -2
- package/dist/assets/css.worker-C7FogG4G.js +0 -93
- package/dist/assets/editor.worker-iXcRX1Tq.js +0 -26
- package/dist/assets/html.worker-C8VxctEJ.js +0 -470
- package/dist/assets/json.worker-CMC9kgPL.js +0 -58
- package/dist/assets/ts.worker-CtTJ3hNN.js +0 -67731
|
@@ -0,0 +1,1062 @@
|
|
|
1
|
+
import '../../editor/browser/coreCommands.js';
|
|
2
|
+
import '../../editor/browser/widget/codeEditor/codeEditorWidget.js';
|
|
3
|
+
import '../../editor/browser/widget/diffEditor/diffEditor.contribution.js';
|
|
4
|
+
import '../../editor/contrib/anchorSelect/browser/anchorSelect.js';
|
|
5
|
+
import '../../editor/contrib/bracketMatching/browser/bracketMatching.js';
|
|
6
|
+
import '../../editor/contrib/caretOperations/browser/caretOperations.js';
|
|
7
|
+
import '../../editor/contrib/caretOperations/browser/transpose.js';
|
|
8
|
+
import '../../editor/contrib/clipboard/browser/clipboard.js';
|
|
9
|
+
import '../../editor/contrib/codeAction/browser/codeActionContributions.js';
|
|
10
|
+
import '../../editor/contrib/codelens/browser/codelensController.js';
|
|
11
|
+
import '../../editor/contrib/colorPicker/browser/colorPickerContribution.js';
|
|
12
|
+
import '../../editor/contrib/comment/browser/comment.js';
|
|
13
|
+
import '../../editor/contrib/contextmenu/browser/contextmenu.js';
|
|
14
|
+
import '../../editor/contrib/cursorUndo/browser/cursorUndo.js';
|
|
15
|
+
import '../../editor/contrib/dnd/browser/dnd.js';
|
|
16
|
+
import '../../editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js';
|
|
17
|
+
import '../../editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution.js';
|
|
18
|
+
import '../../editor/contrib/find/browser/findController.js';
|
|
19
|
+
import '../../editor/contrib/folding/browser/folding.js';
|
|
20
|
+
import '../../editor/contrib/fontZoom/browser/fontZoom.js';
|
|
21
|
+
import '../../editor/contrib/format/browser/formatActions.js';
|
|
22
|
+
import '../../editor/contrib/documentSymbols/browser/documentSymbols.js';
|
|
23
|
+
import '../../editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js';
|
|
24
|
+
import '../../editor/contrib/inlineProgress/browser/inlineProgress.js';
|
|
25
|
+
import '../../editor/contrib/gotoSymbol/browser/goToCommands.js';
|
|
26
|
+
import '../../editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js';
|
|
27
|
+
import '../../editor/contrib/gotoError/browser/gotoError.js';
|
|
28
|
+
import '../../editor/contrib/gpu/browser/gpuActions.js';
|
|
29
|
+
import '../../editor/contrib/hover/browser/hoverContribution.js';
|
|
30
|
+
import '../../editor/contrib/indentation/browser/indentation.js';
|
|
31
|
+
import '../../editor/contrib/inlayHints/browser/inlayHintsContribution.js';
|
|
32
|
+
import '../../editor/contrib/inPlaceReplace/browser/inPlaceReplace.js';
|
|
33
|
+
import '../../editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js';
|
|
34
|
+
import '../../editor/contrib/lineSelection/browser/lineSelection.js';
|
|
35
|
+
import '../../editor/contrib/linesOperations/browser/linesOperations.js';
|
|
36
|
+
import '../../editor/contrib/linkedEditing/browser/linkedEditing.js';
|
|
37
|
+
import '../../editor/contrib/links/browser/links.js';
|
|
38
|
+
import '../../editor/contrib/longLinesHelper/browser/longLinesHelper.js';
|
|
39
|
+
import '../../editor/contrib/middleScroll/browser/middleScroll.contribution.js';
|
|
40
|
+
import '../../editor/contrib/multicursor/browser/multicursor.js';
|
|
41
|
+
import '../../editor/contrib/parameterHints/browser/parameterHints.js';
|
|
42
|
+
import '../../editor/contrib/placeholderText/browser/placeholderText.contribution.js';
|
|
43
|
+
import '../../editor/contrib/rename/browser/rename.js';
|
|
44
|
+
import '../../editor/contrib/sectionHeaders/browser/sectionHeaders.js';
|
|
45
|
+
import '../../editor/contrib/semanticTokens/browser/documentSemanticTokens.js';
|
|
46
|
+
import '../../editor/contrib/semanticTokens/browser/viewportSemanticTokens.js';
|
|
47
|
+
import '../../editor/contrib/smartSelect/browser/smartSelect.js';
|
|
48
|
+
import '../../editor/contrib/snippet/browser/snippetController2.js';
|
|
49
|
+
import '../../editor/contrib/stickyScroll/browser/stickyScrollContribution.js';
|
|
50
|
+
import '../../editor/contrib/suggest/browser/suggestController.js';
|
|
51
|
+
import '../../editor/contrib/suggest/browser/suggestInlineCompletions.js';
|
|
52
|
+
import '../../editor/contrib/tokenization/browser/tokenization.js';
|
|
53
|
+
import '../../editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js';
|
|
54
|
+
import '../../editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js';
|
|
55
|
+
import '../../editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js';
|
|
56
|
+
import '../../editor/contrib/wordHighlighter/browser/wordHighlighter.js';
|
|
57
|
+
import '../../editor/contrib/wordOperations/browser/wordOperations.js';
|
|
58
|
+
import '../../editor/contrib/wordPartOperations/browser/wordPartOperations.js';
|
|
59
|
+
import '../../editor/contrib/readOnlyMessage/browser/contribution.js';
|
|
60
|
+
import '../../editor/contrib/diffEditorBreadcrumbs/browser/contribution.js';
|
|
61
|
+
import '../../editor/contrib/floatingMenu/browser/floatingMenu.contribution.js';
|
|
62
|
+
import '../../editor/common/standaloneStrings.js';
|
|
63
|
+
import '../../base/browser/ui/codicons/codicon/codicon.css';
|
|
64
|
+
import '../../base/browser/ui/codicons/codicon/codicon-modifiers.css';
|
|
65
|
+
import '../../editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js';
|
|
66
|
+
import '../../editor/standalone/browser/inspectTokens/inspectTokens.js';
|
|
67
|
+
import '../../editor/standalone/browser/quickAccess/standaloneHelpQuickAccess.js';
|
|
68
|
+
import '../../editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js';
|
|
69
|
+
import '../../editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess.js';
|
|
70
|
+
import '../../editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess.js';
|
|
71
|
+
import '../../editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js';
|
|
72
|
+
import '../../editor/standalone/browser/toggleHighContrast/toggleHighContrast.js';
|
|
73
|
+
import { languages } from '../../editor/editor.api2.js';
|
|
74
|
+
|
|
75
|
+
const EMPTY_ELEMENTS = [
|
|
76
|
+
"assign",
|
|
77
|
+
"flush",
|
|
78
|
+
"ftl",
|
|
79
|
+
"return",
|
|
80
|
+
"global",
|
|
81
|
+
"import",
|
|
82
|
+
"include",
|
|
83
|
+
"break",
|
|
84
|
+
"continue",
|
|
85
|
+
"local",
|
|
86
|
+
"nested",
|
|
87
|
+
"nt",
|
|
88
|
+
"setting",
|
|
89
|
+
"stop",
|
|
90
|
+
"t",
|
|
91
|
+
"lt",
|
|
92
|
+
"rt",
|
|
93
|
+
"fallback"
|
|
94
|
+
];
|
|
95
|
+
const BLOCK_ELEMENTS = [
|
|
96
|
+
"attempt",
|
|
97
|
+
"autoesc",
|
|
98
|
+
"autoEsc",
|
|
99
|
+
"compress",
|
|
100
|
+
"comment",
|
|
101
|
+
"escape",
|
|
102
|
+
"noescape",
|
|
103
|
+
"function",
|
|
104
|
+
"if",
|
|
105
|
+
"list",
|
|
106
|
+
"items",
|
|
107
|
+
"sep",
|
|
108
|
+
"macro",
|
|
109
|
+
"noparse",
|
|
110
|
+
"noParse",
|
|
111
|
+
"noautoesc",
|
|
112
|
+
"noAutoEsc",
|
|
113
|
+
"outputformat",
|
|
114
|
+
"switch",
|
|
115
|
+
"visit",
|
|
116
|
+
"recurse"
|
|
117
|
+
];
|
|
118
|
+
const TagSyntaxAngle = {
|
|
119
|
+
close: ">",
|
|
120
|
+
id: "angle",
|
|
121
|
+
open: "<"
|
|
122
|
+
};
|
|
123
|
+
const TagSyntaxBracket = {
|
|
124
|
+
close: "\\]",
|
|
125
|
+
id: "bracket",
|
|
126
|
+
open: "\\["
|
|
127
|
+
};
|
|
128
|
+
const TagSyntaxAuto = {
|
|
129
|
+
close: "[>\\]]",
|
|
130
|
+
id: "auto",
|
|
131
|
+
open: "[<\\[]"
|
|
132
|
+
};
|
|
133
|
+
const InterpolationSyntaxDollar = {
|
|
134
|
+
close: "\\}",
|
|
135
|
+
id: "dollar",
|
|
136
|
+
open1: "\\$",
|
|
137
|
+
open2: "\\{"
|
|
138
|
+
};
|
|
139
|
+
const InterpolationSyntaxBracket = {
|
|
140
|
+
close: "\\]",
|
|
141
|
+
id: "bracket",
|
|
142
|
+
open1: "\\[",
|
|
143
|
+
open2: "="
|
|
144
|
+
};
|
|
145
|
+
function createLangConfiguration(ts) {
|
|
146
|
+
return {
|
|
147
|
+
brackets: [
|
|
148
|
+
["<", ">"],
|
|
149
|
+
["[", "]"],
|
|
150
|
+
["(", ")"],
|
|
151
|
+
["{", "}"]
|
|
152
|
+
],
|
|
153
|
+
comments: {
|
|
154
|
+
blockComment: [`${ts.open}--`, `--${ts.close}`]
|
|
155
|
+
},
|
|
156
|
+
autoCloseBefore: "\n\r }]),.:;=",
|
|
157
|
+
autoClosingPairs: [
|
|
158
|
+
{ open: "{", close: "}" },
|
|
159
|
+
{ open: "[", close: "]" },
|
|
160
|
+
{ open: "(", close: ")" },
|
|
161
|
+
{ open: '"', close: '"', notIn: ["string"] },
|
|
162
|
+
{ open: "'", close: "'", notIn: ["string"] }
|
|
163
|
+
],
|
|
164
|
+
surroundingPairs: [
|
|
165
|
+
{ open: '"', close: '"' },
|
|
166
|
+
{ open: "'", close: "'" },
|
|
167
|
+
{ open: "{", close: "}" },
|
|
168
|
+
{ open: "[", close: "]" },
|
|
169
|
+
{ open: "(", close: ")" },
|
|
170
|
+
{ open: "<", close: ">" }
|
|
171
|
+
],
|
|
172
|
+
folding: {
|
|
173
|
+
markers: {
|
|
174
|
+
start: new RegExp(
|
|
175
|
+
`${ts.open}#(?:${BLOCK_ELEMENTS.join("|")})([^/${ts.close}]*(?!/)${ts.close})[^${ts.open}]*$`
|
|
176
|
+
),
|
|
177
|
+
end: new RegExp(`${ts.open}/#(?:${BLOCK_ELEMENTS.join("|")})[\\r\\n\\t ]*>`)
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
onEnterRules: [
|
|
181
|
+
{
|
|
182
|
+
beforeText: new RegExp(
|
|
183
|
+
`${ts.open}#(?!(?:${EMPTY_ELEMENTS.join("|")}))([a-zA-Z_]+)([^/${ts.close}]*(?!/)${ts.close})[^${ts.open}]*$`
|
|
184
|
+
),
|
|
185
|
+
afterText: new RegExp(`^${ts.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${ts.close}$`),
|
|
186
|
+
action: {
|
|
187
|
+
indentAction: languages.IndentAction.IndentOutdent
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
beforeText: new RegExp(
|
|
192
|
+
`${ts.open}#(?!(?:${EMPTY_ELEMENTS.join("|")}))([a-zA-Z_]+)([^/${ts.close}]*(?!/)${ts.close})[^${ts.open}]*$`
|
|
193
|
+
),
|
|
194
|
+
action: { indentAction: languages.IndentAction.Indent }
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
function createLangConfigurationAuto() {
|
|
200
|
+
return {
|
|
201
|
+
// Cannot set block comment delimiter in auto mode...
|
|
202
|
+
// It depends on the content and the cursor position of the file...
|
|
203
|
+
brackets: [
|
|
204
|
+
["<", ">"],
|
|
205
|
+
["[", "]"],
|
|
206
|
+
["(", ")"],
|
|
207
|
+
["{", "}"]
|
|
208
|
+
],
|
|
209
|
+
autoCloseBefore: "\n\r }]),.:;=",
|
|
210
|
+
autoClosingPairs: [
|
|
211
|
+
{ open: "{", close: "}" },
|
|
212
|
+
{ open: "[", close: "]" },
|
|
213
|
+
{ open: "(", close: ")" },
|
|
214
|
+
{ open: '"', close: '"', notIn: ["string"] },
|
|
215
|
+
{ open: "'", close: "'", notIn: ["string"] }
|
|
216
|
+
],
|
|
217
|
+
surroundingPairs: [
|
|
218
|
+
{ open: '"', close: '"' },
|
|
219
|
+
{ open: "'", close: "'" },
|
|
220
|
+
{ open: "{", close: "}" },
|
|
221
|
+
{ open: "[", close: "]" },
|
|
222
|
+
{ open: "(", close: ")" },
|
|
223
|
+
{ open: "<", close: ">" }
|
|
224
|
+
],
|
|
225
|
+
folding: {
|
|
226
|
+
markers: {
|
|
227
|
+
start: new RegExp(`[<\\[]#(?:${BLOCK_ELEMENTS.join("|")})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),
|
|
228
|
+
end: new RegExp(`[<\\[]/#(?:${BLOCK_ELEMENTS.join("|")})[\\r\\n\\t ]*>`)
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
onEnterRules: [
|
|
232
|
+
{
|
|
233
|
+
beforeText: new RegExp(
|
|
234
|
+
`[<\\[]#(?!(?:${EMPTY_ELEMENTS.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`
|
|
235
|
+
),
|
|
236
|
+
afterText: new RegExp(`^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$`),
|
|
237
|
+
action: {
|
|
238
|
+
indentAction: languages.IndentAction.IndentOutdent
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
beforeText: new RegExp(
|
|
243
|
+
`[<\\[]#(?!(?:${EMPTY_ELEMENTS.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`
|
|
244
|
+
),
|
|
245
|
+
action: { indentAction: languages.IndentAction.Indent }
|
|
246
|
+
}
|
|
247
|
+
]
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
function createMonarchLanguage(ts, is) {
|
|
251
|
+
const id = `_${ts.id}_${is.id}`;
|
|
252
|
+
const s = (name) => name.replace(/__id__/g, id);
|
|
253
|
+
const r = (regexp) => {
|
|
254
|
+
const source = regexp.source.replace(/__id__/g, id);
|
|
255
|
+
return new RegExp(source, regexp.flags);
|
|
256
|
+
};
|
|
257
|
+
return {
|
|
258
|
+
// Settings
|
|
259
|
+
unicode: true,
|
|
260
|
+
includeLF: false,
|
|
261
|
+
start: s("default__id__"),
|
|
262
|
+
ignoreCase: false,
|
|
263
|
+
defaultToken: "invalid",
|
|
264
|
+
tokenPostfix: `.freemarker2`,
|
|
265
|
+
brackets: [
|
|
266
|
+
{ open: "{", close: "}", token: "delimiter.curly" },
|
|
267
|
+
{ open: "[", close: "]", token: "delimiter.square" },
|
|
268
|
+
{ open: "(", close: ")", token: "delimiter.parenthesis" },
|
|
269
|
+
{ open: "<", close: ">", token: "delimiter.angle" }
|
|
270
|
+
],
|
|
271
|
+
// Dynamic RegExp
|
|
272
|
+
[s("open__id__")]: new RegExp(ts.open),
|
|
273
|
+
[s("close__id__")]: new RegExp(ts.close),
|
|
274
|
+
[s("iOpen1__id__")]: new RegExp(is.open1),
|
|
275
|
+
[s("iOpen2__id__")]: new RegExp(is.open2),
|
|
276
|
+
[s("iClose__id__")]: new RegExp(is.close),
|
|
277
|
+
// <#START_TAG : "<" | "<#" | "[#">
|
|
278
|
+
// <#END_TAG : "</" | "</#" | "[/#">
|
|
279
|
+
[s("startTag__id__")]: r(/(@open__id__)(#)/),
|
|
280
|
+
[s("endTag__id__")]: r(/(@open__id__)(\/#)/),
|
|
281
|
+
[s("startOrEndTag__id__")]: r(/(@open__id__)(\/?#)/),
|
|
282
|
+
// <#CLOSE_TAG1 : (<BLANK>)* (">" | "]")>
|
|
283
|
+
[s("closeTag1__id__")]: r(/((?:@blank)*)(@close__id__)/),
|
|
284
|
+
// <#CLOSE_TAG2 : (<BLANK>)* ("/")? (">" | "]")>
|
|
285
|
+
[s("closeTag2__id__")]: r(/((?:@blank)*\/?)(@close__id__)/),
|
|
286
|
+
// Static RegExp
|
|
287
|
+
// <#BLANK : " " | "\t" | "\n" | "\r">
|
|
288
|
+
blank: /[ \t\n\r]/,
|
|
289
|
+
// <FALSE : "false">
|
|
290
|
+
// <TRUE : "true">
|
|
291
|
+
// <IN : "in">
|
|
292
|
+
// <AS : "as">
|
|
293
|
+
// <USING : "using">
|
|
294
|
+
keywords: ["false", "true", "in", "as", "using"],
|
|
295
|
+
// Directive names that cannot have an expression parameters and cannot be self-closing
|
|
296
|
+
// E.g. <#if id==2> ... </#if>
|
|
297
|
+
directiveStartCloseTag1: /attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,
|
|
298
|
+
// Directive names that cannot have an expression parameter and can be self-closing
|
|
299
|
+
// E.g. <#if> ... <#else> ... </#if>
|
|
300
|
+
// E.g. <#if> ... <#else /></#if>
|
|
301
|
+
directiveStartCloseTag2: /else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,
|
|
302
|
+
// Directive names that can have an expression parameter and cannot be self-closing
|
|
303
|
+
// E.g. <#if id==2> ... </#if>
|
|
304
|
+
directiveStartBlank: /if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,
|
|
305
|
+
// Directive names that can have an end tag
|
|
306
|
+
// E.g. </#if>
|
|
307
|
+
directiveEndCloseTag1: /if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,
|
|
308
|
+
// <#ESCAPED_CHAR :
|
|
309
|
+
// "\\"
|
|
310
|
+
// (
|
|
311
|
+
// ("n" | "t" | "r" | "f" | "b" | "g" | "l" | "a" | "\\" | "'" | "\"" | "{" | "=")
|
|
312
|
+
// |
|
|
313
|
+
// ("x" ["0"-"9", "A"-"F", "a"-"f"])
|
|
314
|
+
// )
|
|
315
|
+
// >
|
|
316
|
+
// Note: While the JavaCC tokenizer rule only specifies one hex digit,
|
|
317
|
+
// FreeMarker actually interprets up to 4 hex digits.
|
|
318
|
+
escapedChar: /\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,
|
|
319
|
+
// <#ASCII_DIGIT: ["0" - "9"]>
|
|
320
|
+
asciiDigit: /[0-9]/,
|
|
321
|
+
// <INTEGER : (["0"-"9"])+>
|
|
322
|
+
integer: /[0-9]+/,
|
|
323
|
+
// <#NON_ESCAPED_ID_START_CHAR:
|
|
324
|
+
// [
|
|
325
|
+
// // This was generated on JDK 1.8.0_20 Win64 with src/main/misc/identifierChars/IdentifierCharGenerator.java
|
|
326
|
+
// ...
|
|
327
|
+
// ]
|
|
328
|
+
nonEscapedIdStartChar: /[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,
|
|
329
|
+
// <#ESCAPED_ID_CHAR: "\\" ("-" | "." | ":" | "#")>
|
|
330
|
+
escapedIdChar: /\\[\-\.:#]/,
|
|
331
|
+
// <#ID_START_CHAR: <NON_ESCAPED_ID_START_CHAR>|<ESCAPED_ID_CHAR>>
|
|
332
|
+
idStartChar: /(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,
|
|
333
|
+
// <ID: <ID_START_CHAR> (<ID_START_CHAR>|<ASCII_DIGIT>)*>
|
|
334
|
+
id: /(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,
|
|
335
|
+
// Certain keywords / operators are allowed to index hashes
|
|
336
|
+
//
|
|
337
|
+
// Expression DotVariable(Expression exp) :
|
|
338
|
+
// {
|
|
339
|
+
// Token t;
|
|
340
|
+
// }
|
|
341
|
+
// {
|
|
342
|
+
// <DOT>
|
|
343
|
+
// (
|
|
344
|
+
// t = <ID> | t = <TIMES> | t = <DOUBLE_STAR>
|
|
345
|
+
// |
|
|
346
|
+
// (
|
|
347
|
+
// t = <LESS_THAN>
|
|
348
|
+
// |
|
|
349
|
+
// t = <LESS_THAN_EQUALS>
|
|
350
|
+
// |
|
|
351
|
+
// t = <ESCAPED_GT>
|
|
352
|
+
// |
|
|
353
|
+
// t = <ESCAPED_GTE>
|
|
354
|
+
// |
|
|
355
|
+
// t = <FALSE>
|
|
356
|
+
// |
|
|
357
|
+
// t = <TRUE>
|
|
358
|
+
// |
|
|
359
|
+
// t = <IN>
|
|
360
|
+
// |
|
|
361
|
+
// t = <AS>
|
|
362
|
+
// |
|
|
363
|
+
// t = <USING>
|
|
364
|
+
// )
|
|
365
|
+
// {
|
|
366
|
+
// if (!Character.isLetter(t.image.charAt(0))) {
|
|
367
|
+
// throw new ParseException(t.image + " is not a valid identifier.", template, t);
|
|
368
|
+
// }
|
|
369
|
+
// }
|
|
370
|
+
// )
|
|
371
|
+
// {
|
|
372
|
+
// notListLiteral(exp, "hash");
|
|
373
|
+
// notStringLiteral(exp, "hash");
|
|
374
|
+
// notBooleanLiteral(exp, "hash");
|
|
375
|
+
// Dot dot = new Dot(exp, t.image);
|
|
376
|
+
// dot.setLocation(template, exp, t);
|
|
377
|
+
// return dot;
|
|
378
|
+
// }
|
|
379
|
+
// }
|
|
380
|
+
specialHashKeys: /\*\*|\*|false|true|in|as|using/,
|
|
381
|
+
// <DOUBLE_EQUALS : "==">
|
|
382
|
+
// <EQUALS : "=">
|
|
383
|
+
// <NOT_EQUALS : "!=">
|
|
384
|
+
// <PLUS_EQUALS : "+=">
|
|
385
|
+
// <MINUS_EQUALS : "-=">
|
|
386
|
+
// <TIMES_EQUALS : "*=">
|
|
387
|
+
// <DIV_EQUALS : "/=">
|
|
388
|
+
// <MOD_EQUALS : "%=">
|
|
389
|
+
// <PLUS_PLUS : "++">
|
|
390
|
+
// <MINUS_MINUS : "--">
|
|
391
|
+
// <LESS_THAN_EQUALS : "lte" | "\\lte" | "<=" | "<=">
|
|
392
|
+
// <LESS_THAN : "lt" | "\\lt" | "<" | "<">
|
|
393
|
+
// <ESCAPED_GTE : "gte" | "\\gte" | ">=">
|
|
394
|
+
// <ESCAPED_GT: "gt" | "\\gt" | ">">
|
|
395
|
+
// <DOUBLE_STAR : "**">
|
|
396
|
+
// <PLUS : "+">
|
|
397
|
+
// <MINUS : "-">
|
|
398
|
+
// <TIMES : "*">
|
|
399
|
+
// <PERCENT : "%">
|
|
400
|
+
// <AND : "&" | "&&" | "&&" | "\\and" >
|
|
401
|
+
// <OR : "|" | "||">
|
|
402
|
+
// <EXCLAM : "!">
|
|
403
|
+
// <COMMA : ",">
|
|
404
|
+
// <SEMICOLON : ";">
|
|
405
|
+
// <COLON : ":">
|
|
406
|
+
// <ELLIPSIS : "...">
|
|
407
|
+
// <DOT_DOT_ASTERISK : "..*" >
|
|
408
|
+
// <DOT_DOT_LESS : "..<" | "..!" >
|
|
409
|
+
// <DOT_DOT : "..">
|
|
410
|
+
// <EXISTS : "??">
|
|
411
|
+
// <BUILT_IN : "?">
|
|
412
|
+
// <LAMBDA_ARROW : "->" | "->">
|
|
413
|
+
namedSymbols: /<=|>=|\\lte|\\lt|<|\\gte|\\gt|>|&&|\\and|->|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,
|
|
414
|
+
arrows: ["->", "->"],
|
|
415
|
+
delimiters: [";", ":", ",", "."],
|
|
416
|
+
stringOperators: ["lte", "lt", "gte", "gt"],
|
|
417
|
+
noParseTags: ["noparse", "noParse", "comment"],
|
|
418
|
+
tokenizer: {
|
|
419
|
+
// Parser states
|
|
420
|
+
// Plain text
|
|
421
|
+
[s("default__id__")]: [
|
|
422
|
+
{ include: s("@directive_token__id__") },
|
|
423
|
+
{ include: s("@interpolation_and_text_token__id__") }
|
|
424
|
+
],
|
|
425
|
+
// A FreeMarker expression inside a directive, e.g. <#if 2<3>
|
|
426
|
+
[s("fmExpression__id__.directive")]: [
|
|
427
|
+
{ include: s("@blank_and_expression_comment_token__id__") },
|
|
428
|
+
{ include: s("@directive_end_token__id__") },
|
|
429
|
+
{ include: s("@expression_token__id__") }
|
|
430
|
+
],
|
|
431
|
+
// A FreeMarker expression inside an interpolation, e.g. ${2+3}
|
|
432
|
+
[s("fmExpression__id__.interpolation")]: [
|
|
433
|
+
{ include: s("@blank_and_expression_comment_token__id__") },
|
|
434
|
+
{ include: s("@expression_token__id__") },
|
|
435
|
+
{ include: s("@greater_operators_token__id__") }
|
|
436
|
+
],
|
|
437
|
+
// In an expression and inside a not-yet closed parenthesis / bracket
|
|
438
|
+
[s("inParen__id__.plain")]: [
|
|
439
|
+
{ include: s("@blank_and_expression_comment_token__id__") },
|
|
440
|
+
{ include: s("@directive_end_token__id__") },
|
|
441
|
+
{ include: s("@expression_token__id__") }
|
|
442
|
+
],
|
|
443
|
+
[s("inParen__id__.gt")]: [
|
|
444
|
+
{ include: s("@blank_and_expression_comment_token__id__") },
|
|
445
|
+
{ include: s("@expression_token__id__") },
|
|
446
|
+
{ include: s("@greater_operators_token__id__") }
|
|
447
|
+
],
|
|
448
|
+
// Expression for the unified call, e.g. <@createMacro() ... >
|
|
449
|
+
[s("noSpaceExpression__id__")]: [
|
|
450
|
+
{ include: s("@no_space_expression_end_token__id__") },
|
|
451
|
+
{ include: s("@directive_end_token__id__") },
|
|
452
|
+
{ include: s("@expression_token__id__") }
|
|
453
|
+
],
|
|
454
|
+
// For the function of a unified call. Special case for when the
|
|
455
|
+
// expression is a simple identifier.
|
|
456
|
+
// <@join [1,2] ",">
|
|
457
|
+
// <@null!join [1,2] ",">
|
|
458
|
+
[s("unifiedCall__id__")]: [{ include: s("@unified_call_token__id__") }],
|
|
459
|
+
// For singly and doubly quoted string (that may contain interpolations)
|
|
460
|
+
[s("singleString__id__")]: [{ include: s("@string_single_token__id__") }],
|
|
461
|
+
[s("doubleString__id__")]: [{ include: s("@string_double_token__id__") }],
|
|
462
|
+
// For singly and doubly quoted string (that may not contain interpolations)
|
|
463
|
+
[s("rawSingleString__id__")]: [{ include: s("@string_single_raw_token__id__") }],
|
|
464
|
+
[s("rawDoubleString__id__")]: [{ include: s("@string_double_raw_token__id__") }],
|
|
465
|
+
// For a comment in an expression
|
|
466
|
+
// ${ 1 + <#-- comment --> 2}
|
|
467
|
+
[s("expressionComment__id__")]: [{ include: s("@expression_comment_token__id__") }],
|
|
468
|
+
// For <#noparse> ... </#noparse>
|
|
469
|
+
// For <#noParse> ... </#noParse>
|
|
470
|
+
// For <#comment> ... </#comment>
|
|
471
|
+
[s("noParse__id__")]: [{ include: s("@no_parse_token__id__") }],
|
|
472
|
+
// For <#-- ... -->
|
|
473
|
+
[s("terseComment__id__")]: [{ include: s("@terse_comment_token__id__") }],
|
|
474
|
+
// Common rules
|
|
475
|
+
[s("directive_token__id__")]: [
|
|
476
|
+
// <ATTEMPT : <START_TAG> "attempt" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
477
|
+
// <RECOVER : <START_TAG> "recover" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
478
|
+
// <SEP : <START_TAG> "sep" <CLOSE_TAG1>>
|
|
479
|
+
// <AUTOESC : <START_TAG> "auto" ("e"|"E") "sc" <CLOSE_TAG1>> {
|
|
480
|
+
// handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 4), DEFAULT);
|
|
481
|
+
// }
|
|
482
|
+
// <NOAUTOESC : <START_TAG> "no" ("autoe"|"AutoE") "sc" <CLOSE_TAG1>> {
|
|
483
|
+
// handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 2), DEFAULT);
|
|
484
|
+
// }
|
|
485
|
+
// <COMPRESS : <START_TAG> "compress" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
486
|
+
// <DEFAUL : <START_TAG> "default" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
487
|
+
// <NOESCAPE : <START_TAG> "no" ("e" | "E") "scape" <CLOSE_TAG1>> {
|
|
488
|
+
// handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 2), DEFAULT);
|
|
489
|
+
// }
|
|
490
|
+
//
|
|
491
|
+
// <COMMENT : <START_TAG> "comment" <CLOSE_TAG1>> {
|
|
492
|
+
// handleTagSyntaxAndSwitch(matchedToken, NO_PARSE); noparseTag = "comment";
|
|
493
|
+
// }
|
|
494
|
+
// <NOPARSE: <START_TAG> "no" ("p" | "P") "arse" <CLOSE_TAG1>> {
|
|
495
|
+
// int tagNamingConvention = getTagNamingConvention(matchedToken, 2);
|
|
496
|
+
// handleTagSyntaxAndSwitch(matchedToken, tagNamingConvention, NO_PARSE);
|
|
497
|
+
// noparseTag = tagNamingConvention == Configuration.CAMEL_CASE_NAMING_CONVENTION ? "noParse" : "noparse";
|
|
498
|
+
// }
|
|
499
|
+
[
|
|
500
|
+
r(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),
|
|
501
|
+
ts.id === "auto" ? {
|
|
502
|
+
cases: {
|
|
503
|
+
"$1==<": { token: "@rematch", switchTo: `@default_angle_${is.id}` },
|
|
504
|
+
"$1==[": { token: "@rematch", switchTo: `@default_bracket_${is.id}` }
|
|
505
|
+
}
|
|
506
|
+
} : [
|
|
507
|
+
{ token: "@brackets.directive" },
|
|
508
|
+
{ token: "delimiter.directive" },
|
|
509
|
+
{
|
|
510
|
+
cases: {
|
|
511
|
+
"@noParseTags": { token: "tag", next: s("@noParse__id__.$3") },
|
|
512
|
+
"@default": { token: "tag" }
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
{ token: "delimiter.directive" },
|
|
516
|
+
{ token: "@brackets.directive" }
|
|
517
|
+
]
|
|
518
|
+
],
|
|
519
|
+
// <ELSE : <START_TAG> "else" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
520
|
+
// <BREAK : <START_TAG> "break" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
521
|
+
// <CONTINUE : <START_TAG> "continue" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
522
|
+
// <SIMPLE_RETURN : <START_TAG> "return" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
523
|
+
// <HALT : <START_TAG> "stop" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
524
|
+
// <FLUSH : <START_TAG> "flush" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
525
|
+
// <TRIM : <START_TAG> "t" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
526
|
+
// <LTRIM : <START_TAG> "lt" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
527
|
+
// <RTRIM : <START_TAG> "rt" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
528
|
+
// <NOTRIM : <START_TAG> "nt" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
529
|
+
// <SIMPLE_NESTED : <START_TAG> "nested" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
530
|
+
// <SIMPLE_RECURSE : <START_TAG> "recurse" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
531
|
+
// <FALLBACK : <START_TAG> "fallback" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
532
|
+
// <TRIVIAL_FTL_HEADER : ("<#ftl" | "[#ftl") ("/")? (">" | "]")> { ftlHeader(matchedToken); }
|
|
533
|
+
[
|
|
534
|
+
r(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),
|
|
535
|
+
ts.id === "auto" ? {
|
|
536
|
+
cases: {
|
|
537
|
+
"$1==<": { token: "@rematch", switchTo: `@default_angle_${is.id}` },
|
|
538
|
+
"$1==[": { token: "@rematch", switchTo: `@default_bracket_${is.id}` }
|
|
539
|
+
}
|
|
540
|
+
} : [
|
|
541
|
+
{ token: "@brackets.directive" },
|
|
542
|
+
{ token: "delimiter.directive" },
|
|
543
|
+
{ token: "tag" },
|
|
544
|
+
{ token: "delimiter.directive" },
|
|
545
|
+
{ token: "@brackets.directive" }
|
|
546
|
+
]
|
|
547
|
+
],
|
|
548
|
+
// <IF : <START_TAG> "if" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
|
|
549
|
+
// <ELSE_IF : <START_TAG> "else" ("i" | "I") "f" <BLANK>> {
|
|
550
|
+
// handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 4), FM_EXPRESSION);
|
|
551
|
+
// }
|
|
552
|
+
// <LIST : <START_TAG> "list" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
|
|
553
|
+
// <FOREACH : <START_TAG> "for" ("e" | "E") "ach" <BLANK>> {
|
|
554
|
+
// handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 3), FM_EXPRESSION);
|
|
555
|
+
// }
|
|
556
|
+
// <SWITCH : <START_TAG> "switch" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
|
|
557
|
+
// <CASE : <START_TAG> "case" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
|
|
558
|
+
// <ASSIGN : <START_TAG> "assign" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
|
|
559
|
+
// <GLOBALASSIGN : <START_TAG> "global" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
|
|
560
|
+
// <LOCALASSIGN : <START_TAG> "local" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
|
|
561
|
+
// <_INCLUDE : <START_TAG> "include" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
|
|
562
|
+
// <IMPORT : <START_TAG> "import" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
|
|
563
|
+
// <FUNCTION : <START_TAG> "function" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
|
|
564
|
+
// <MACRO : <START_TAG> "macro" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
|
|
565
|
+
// <TRANSFORM : <START_TAG> "transform" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
|
|
566
|
+
// <VISIT : <START_TAG> "visit" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
|
|
567
|
+
// <STOP : <START_TAG> "stop" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
|
|
568
|
+
// <RETURN : <START_TAG> "return" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
|
|
569
|
+
// <CALL : <START_TAG> "call" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
|
|
570
|
+
// <SETTING : <START_TAG> "setting" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
|
|
571
|
+
// <OUTPUTFORMAT : <START_TAG> "output" ("f"|"F") "ormat" <BLANK>> {
|
|
572
|
+
// handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 6), FM_EXPRESSION);
|
|
573
|
+
// }
|
|
574
|
+
// <NESTED : <START_TAG> "nested" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
|
|
575
|
+
// <RECURSE : <START_TAG> "recurse" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
|
|
576
|
+
// <ESCAPE : <START_TAG> "escape" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
|
|
577
|
+
//
|
|
578
|
+
// Note: FreeMarker grammar appears to treat the FTL header as a special case,
|
|
579
|
+
// in order to remove new lines after the header (?), but since we only need
|
|
580
|
+
// to tokenize for highlighting, we can include this directive here.
|
|
581
|
+
// <FTL_HEADER : ("<#ftl" | "[#ftl") <BLANK>> { ftlHeader(matchedToken); }
|
|
582
|
+
//
|
|
583
|
+
// Note: FreeMarker grammar appears to treat the items directive as a special case for
|
|
584
|
+
// the AST parsing process, but since we only need to tokenize, we can include this
|
|
585
|
+
// directive here.
|
|
586
|
+
// <ITEMS : <START_TAG> "items" (<BLANK>)+ <AS> <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
|
|
587
|
+
[
|
|
588
|
+
r(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),
|
|
589
|
+
ts.id === "auto" ? {
|
|
590
|
+
cases: {
|
|
591
|
+
"$1==<": { token: "@rematch", switchTo: `@default_angle_${is.id}` },
|
|
592
|
+
"$1==[": { token: "@rematch", switchTo: `@default_bracket_${is.id}` }
|
|
593
|
+
}
|
|
594
|
+
} : [
|
|
595
|
+
{ token: "@brackets.directive" },
|
|
596
|
+
{ token: "delimiter.directive" },
|
|
597
|
+
{ token: "tag" },
|
|
598
|
+
{ token: "", next: s("@fmExpression__id__.directive") }
|
|
599
|
+
]
|
|
600
|
+
],
|
|
601
|
+
// <END_IF : <END_TAG> "if" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
602
|
+
// <END_LIST : <END_TAG> "list" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
603
|
+
// <END_SEP : <END_TAG> "sep" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
604
|
+
// <END_RECOVER : <END_TAG> "recover" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
605
|
+
// <END_ATTEMPT : <END_TAG> "attempt" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
606
|
+
// <END_FOREACH : <END_TAG> "for" ("e" | "E") "ach" <CLOSE_TAG1>> {
|
|
607
|
+
// handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 3), DEFAULT);
|
|
608
|
+
// }
|
|
609
|
+
// <END_LOCAL : <END_TAG> "local" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
610
|
+
// <END_GLOBAL : <END_TAG> "global" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
611
|
+
// <END_ASSIGN : <END_TAG> "assign" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
612
|
+
// <END_FUNCTION : <END_TAG> "function" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
613
|
+
// <END_MACRO : <END_TAG> "macro" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
614
|
+
// <END_OUTPUTFORMAT : <END_TAG> "output" ("f" | "F") "ormat" <CLOSE_TAG1>> {
|
|
615
|
+
// handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 6), DEFAULT);
|
|
616
|
+
// }
|
|
617
|
+
// <END_AUTOESC : <END_TAG> "auto" ("e" | "E") "sc" <CLOSE_TAG1>> {
|
|
618
|
+
// handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 4), DEFAULT);
|
|
619
|
+
// }
|
|
620
|
+
// <END_NOAUTOESC : <END_TAG> "no" ("autoe"|"AutoE") "sc" <CLOSE_TAG1>> {
|
|
621
|
+
// handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 2), DEFAULT);
|
|
622
|
+
// }
|
|
623
|
+
// <END_COMPRESS : <END_TAG> "compress" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
624
|
+
// <END_TRANSFORM : <END_TAG> "transform" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
625
|
+
// <END_SWITCH : <END_TAG> "switch" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
626
|
+
// <END_ESCAPE : <END_TAG> "escape" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
|
|
627
|
+
// <END_NOESCAPE : <END_TAG> "no" ("e" | "E") "scape" <CLOSE_TAG1>> {
|
|
628
|
+
// handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 2), DEFAULT);
|
|
629
|
+
// }
|
|
630
|
+
[
|
|
631
|
+
r(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),
|
|
632
|
+
ts.id === "auto" ? {
|
|
633
|
+
cases: {
|
|
634
|
+
"$1==<": { token: "@rematch", switchTo: `@default_angle_${is.id}` },
|
|
635
|
+
"$1==[": { token: "@rematch", switchTo: `@default_bracket_${is.id}` }
|
|
636
|
+
}
|
|
637
|
+
} : [
|
|
638
|
+
{ token: "@brackets.directive" },
|
|
639
|
+
{ token: "delimiter.directive" },
|
|
640
|
+
{ token: "tag" },
|
|
641
|
+
{ token: "delimiter.directive" },
|
|
642
|
+
{ token: "@brackets.directive" }
|
|
643
|
+
]
|
|
644
|
+
],
|
|
645
|
+
// <UNIFIED_CALL : "<@" | "[@" > { unifiedCall(matchedToken); }
|
|
646
|
+
[
|
|
647
|
+
r(/(@open__id__)(@)/),
|
|
648
|
+
ts.id === "auto" ? {
|
|
649
|
+
cases: {
|
|
650
|
+
"$1==<": { token: "@rematch", switchTo: `@default_angle_${is.id}` },
|
|
651
|
+
"$1==[": { token: "@rematch", switchTo: `@default_bracket_${is.id}` }
|
|
652
|
+
}
|
|
653
|
+
} : [
|
|
654
|
+
{ token: "@brackets.directive" },
|
|
655
|
+
{ token: "delimiter.directive", next: s("@unifiedCall__id__") }
|
|
656
|
+
]
|
|
657
|
+
],
|
|
658
|
+
// <UNIFIED_CALL_END : ("<" | "[") "/@" ((<ID>) ("."<ID>)*)? <CLOSE_TAG1>> { unifiedCallEnd(matchedToken); }
|
|
659
|
+
[
|
|
660
|
+
r(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),
|
|
661
|
+
[
|
|
662
|
+
{ token: "@brackets.directive" },
|
|
663
|
+
{ token: "delimiter.directive" },
|
|
664
|
+
{ token: "tag" },
|
|
665
|
+
{ token: "delimiter.directive" },
|
|
666
|
+
{ token: "@brackets.directive" }
|
|
667
|
+
]
|
|
668
|
+
],
|
|
669
|
+
// <TERSE_COMMENT : ("<" | "[") "#--" > { noparseTag = "-->"; handleTagSyntaxAndSwitch(matchedToken, NO_PARSE); }
|
|
670
|
+
[
|
|
671
|
+
r(/(@open__id__)#--/),
|
|
672
|
+
ts.id === "auto" ? {
|
|
673
|
+
cases: {
|
|
674
|
+
"$1==<": { token: "@rematch", switchTo: `@default_angle_${is.id}` },
|
|
675
|
+
"$1==[": { token: "@rematch", switchTo: `@default_bracket_${is.id}` }
|
|
676
|
+
}
|
|
677
|
+
} : { token: "comment", next: s("@terseComment__id__") }
|
|
678
|
+
],
|
|
679
|
+
// <UNKNOWN_DIRECTIVE : ("[#" | "[/#" | "<#" | "</#") (["a"-"z", "A"-"Z", "_"])+>
|
|
680
|
+
[
|
|
681
|
+
r(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),
|
|
682
|
+
ts.id === "auto" ? {
|
|
683
|
+
cases: {
|
|
684
|
+
"$1==<": { token: "@rematch", switchTo: `@default_angle_${is.id}` },
|
|
685
|
+
"$1==[": { token: "@rematch", switchTo: `@default_bracket_${is.id}` }
|
|
686
|
+
}
|
|
687
|
+
} : [
|
|
688
|
+
{ token: "@brackets.directive" },
|
|
689
|
+
{ token: "delimiter.directive" },
|
|
690
|
+
{ token: "tag.invalid", next: s("@fmExpression__id__.directive") }
|
|
691
|
+
]
|
|
692
|
+
]
|
|
693
|
+
],
|
|
694
|
+
// <DEFAULT, NO_DIRECTIVE> TOKEN :
|
|
695
|
+
[s("interpolation_and_text_token__id__")]: [
|
|
696
|
+
// <DOLLAR_INTERPOLATION_OPENING : "${"> { startInterpolation(matchedToken); }
|
|
697
|
+
// <SQUARE_BRACKET_INTERPOLATION_OPENING : "[="> { startInterpolation(matchedToken); }
|
|
698
|
+
[
|
|
699
|
+
r(/(@iOpen1__id__)(@iOpen2__id__)/),
|
|
700
|
+
[
|
|
701
|
+
{ token: is.id === "bracket" ? "@brackets.interpolation" : "delimiter.interpolation" },
|
|
702
|
+
{
|
|
703
|
+
token: is.id === "bracket" ? "delimiter.interpolation" : "@brackets.interpolation",
|
|
704
|
+
next: s("@fmExpression__id__.interpolation")
|
|
705
|
+
}
|
|
706
|
+
]
|
|
707
|
+
],
|
|
708
|
+
// <STATIC_TEXT_FALSE_ALARM : "$" | "#" | "<" | "[" | "{"> // to handle a lone dollar sign or "<" or "# or <@ with whitespace after"
|
|
709
|
+
// <STATIC_TEXT_WS : ("\n" | "\r" | "\t" | " ")+>
|
|
710
|
+
// <STATIC_TEXT_NON_WS : (~["$", "<", "#", "[", "{", "\n", "\r", "\t", " "])+>
|
|
711
|
+
[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/, { token: "source" }]
|
|
712
|
+
],
|
|
713
|
+
// <STRING_LITERAL :
|
|
714
|
+
// (
|
|
715
|
+
// "\""
|
|
716
|
+
// ((~["\"", "\\"]) | <ESCAPED_CHAR>)*
|
|
717
|
+
// "\""
|
|
718
|
+
// )
|
|
719
|
+
// |
|
|
720
|
+
// (
|
|
721
|
+
// "'"
|
|
722
|
+
// ((~["'", "\\"]) | <ESCAPED_CHAR>)*
|
|
723
|
+
// "'"
|
|
724
|
+
// )
|
|
725
|
+
// >
|
|
726
|
+
[s("string_single_token__id__")]: [
|
|
727
|
+
[/[^'\\]/, { token: "string" }],
|
|
728
|
+
[/@escapedChar/, { token: "string.escape" }],
|
|
729
|
+
[/'/, { token: "string", next: "@pop" }]
|
|
730
|
+
],
|
|
731
|
+
[s("string_double_token__id__")]: [
|
|
732
|
+
[/[^"\\]/, { token: "string" }],
|
|
733
|
+
[/@escapedChar/, { token: "string.escape" }],
|
|
734
|
+
[/"/, { token: "string", next: "@pop" }]
|
|
735
|
+
],
|
|
736
|
+
// <RAW_STRING : "r" (("\"" (~["\""])* "\"") | ("'" (~["'"])* "'"))>
|
|
737
|
+
[s("string_single_raw_token__id__")]: [
|
|
738
|
+
[/[^']+/, { token: "string.raw" }],
|
|
739
|
+
[/'/, { token: "string.raw", next: "@pop" }]
|
|
740
|
+
],
|
|
741
|
+
[s("string_double_raw_token__id__")]: [
|
|
742
|
+
[/[^"]+/, { token: "string.raw" }],
|
|
743
|
+
[/"/, { token: "string.raw", next: "@pop" }]
|
|
744
|
+
],
|
|
745
|
+
// <FM_EXPRESSION, IN_PAREN, NO_SPACE_EXPRESSION, NAMED_PARAMETER_EXPRESSION> TOKEN :
|
|
746
|
+
[s("expression_token__id__")]: [
|
|
747
|
+
// Strings
|
|
748
|
+
[
|
|
749
|
+
/(r?)(['"])/,
|
|
750
|
+
{
|
|
751
|
+
cases: {
|
|
752
|
+
"r'": [
|
|
753
|
+
{ token: "keyword" },
|
|
754
|
+
{ token: "string.raw", next: s("@rawSingleString__id__") }
|
|
755
|
+
],
|
|
756
|
+
'r"': [
|
|
757
|
+
{ token: "keyword" },
|
|
758
|
+
{ token: "string.raw", next: s("@rawDoubleString__id__") }
|
|
759
|
+
],
|
|
760
|
+
"'": [{ token: "source" }, { token: "string", next: s("@singleString__id__") }],
|
|
761
|
+
'"': [{ token: "source" }, { token: "string", next: s("@doubleString__id__") }]
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
],
|
|
765
|
+
// Numbers
|
|
766
|
+
// <INTEGER : (["0"-"9"])+>
|
|
767
|
+
// <DECIMAL : <INTEGER> "." <INTEGER>>
|
|
768
|
+
[
|
|
769
|
+
/(?:@integer)(?:\.(?:@integer))?/,
|
|
770
|
+
{
|
|
771
|
+
cases: {
|
|
772
|
+
"(?:@integer)": { token: "number" },
|
|
773
|
+
"@default": { token: "number.float" }
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
],
|
|
777
|
+
// Special hash keys that must not be treated as identifiers
|
|
778
|
+
// after a period, e.g. a.** is accessing the key "**" of a
|
|
779
|
+
[
|
|
780
|
+
/(\.)(@blank*)(@specialHashKeys)/,
|
|
781
|
+
[{ token: "delimiter" }, { token: "" }, { token: "identifier" }]
|
|
782
|
+
],
|
|
783
|
+
// Symbols / operators
|
|
784
|
+
[
|
|
785
|
+
/(?:@namedSymbols)/,
|
|
786
|
+
{
|
|
787
|
+
cases: {
|
|
788
|
+
"@arrows": { token: "meta.arrow" },
|
|
789
|
+
"@delimiters": { token: "delimiter" },
|
|
790
|
+
"@default": { token: "operators" }
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
],
|
|
794
|
+
// Identifiers
|
|
795
|
+
[
|
|
796
|
+
/@id/,
|
|
797
|
+
{
|
|
798
|
+
cases: {
|
|
799
|
+
"@keywords": { token: "keyword.$0" },
|
|
800
|
+
"@stringOperators": { token: "operators" },
|
|
801
|
+
"@default": { token: "identifier" }
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
],
|
|
805
|
+
// <OPEN_BRACKET : "[">
|
|
806
|
+
// <CLOSE_BRACKET : "]">
|
|
807
|
+
// <OPEN_PAREN : "(">
|
|
808
|
+
// <CLOSE_PAREN : ")">
|
|
809
|
+
// <OPENING_CURLY_BRACKET : "{">
|
|
810
|
+
// <CLOSING_CURLY_BRACKET : "}">
|
|
811
|
+
[
|
|
812
|
+
/[\[\]\(\)\{\}]/,
|
|
813
|
+
{
|
|
814
|
+
cases: {
|
|
815
|
+
"\\[": {
|
|
816
|
+
cases: {
|
|
817
|
+
"$S2==gt": { token: "@brackets", next: s("@inParen__id__.gt") },
|
|
818
|
+
"@default": { token: "@brackets", next: s("@inParen__id__.plain") }
|
|
819
|
+
}
|
|
820
|
+
},
|
|
821
|
+
"\\]": {
|
|
822
|
+
cases: {
|
|
823
|
+
...is.id === "bracket" ? {
|
|
824
|
+
"$S2==interpolation": { token: "@brackets.interpolation", next: "@popall" }
|
|
825
|
+
} : {},
|
|
826
|
+
// This cannot happen while in auto mode, since this applies only to an
|
|
827
|
+
// fmExpression inside a directive. But once we encounter the start of a
|
|
828
|
+
// directive, we can establish the tag syntax mode.
|
|
829
|
+
...ts.id === "bracket" ? {
|
|
830
|
+
"$S2==directive": { token: "@brackets.directive", next: "@popall" }
|
|
831
|
+
} : {},
|
|
832
|
+
// Ignore mismatched paren
|
|
833
|
+
[s("$S1==inParen__id__")]: { token: "@brackets", next: "@pop" },
|
|
834
|
+
"@default": { token: "@brackets" }
|
|
835
|
+
}
|
|
836
|
+
},
|
|
837
|
+
"\\(": { token: "@brackets", next: s("@inParen__id__.gt") },
|
|
838
|
+
"\\)": {
|
|
839
|
+
cases: {
|
|
840
|
+
[s("$S1==inParen__id__")]: { token: "@brackets", next: "@pop" },
|
|
841
|
+
"@default": { token: "@brackets" }
|
|
842
|
+
}
|
|
843
|
+
},
|
|
844
|
+
"\\{": {
|
|
845
|
+
cases: {
|
|
846
|
+
"$S2==gt": { token: "@brackets", next: s("@inParen__id__.gt") },
|
|
847
|
+
"@default": { token: "@brackets", next: s("@inParen__id__.plain") }
|
|
848
|
+
}
|
|
849
|
+
},
|
|
850
|
+
"\\}": {
|
|
851
|
+
cases: {
|
|
852
|
+
...is.id === "bracket" ? {} : {
|
|
853
|
+
"$S2==interpolation": { token: "@brackets.interpolation", next: "@popall" }
|
|
854
|
+
},
|
|
855
|
+
// Ignore mismatched paren
|
|
856
|
+
[s("$S1==inParen__id__")]: { token: "@brackets", next: "@pop" },
|
|
857
|
+
"@default": { token: "@brackets" }
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
],
|
|
863
|
+
// <OPEN_MISPLACED_INTERPOLATION : "${" | "#{" | "[=">
|
|
864
|
+
[/\$\{/, { token: "delimiter.invalid" }]
|
|
865
|
+
],
|
|
866
|
+
// <FM_EXPRESSION, IN_PAREN, NAMED_PARAMETER_EXPRESSION> SKIP :
|
|
867
|
+
[s("blank_and_expression_comment_token__id__")]: [
|
|
868
|
+
// < ( " " | "\t" | "\n" | "\r" )+ >
|
|
869
|
+
[/(?:@blank)+/, { token: "" }],
|
|
870
|
+
// < ("<" | "[") ("#" | "!") "--"> : EXPRESSION_COMMENT
|
|
871
|
+
[/[<\[][#!]--/, { token: "comment", next: s("@expressionComment__id__") }]
|
|
872
|
+
],
|
|
873
|
+
// <FM_EXPRESSION, NO_SPACE_EXPRESSION, NAMED_PARAMETER_EXPRESSION> TOKEN :
|
|
874
|
+
[s("directive_end_token__id__")]: [
|
|
875
|
+
// <DIRECTIVE_END : ">">
|
|
876
|
+
// {
|
|
877
|
+
// if (inFTLHeader) {
|
|
878
|
+
// eatNewline();
|
|
879
|
+
// inFTLHeader = false;
|
|
880
|
+
// }
|
|
881
|
+
// if (squBracTagSyntax || postInterpolationLexState != -1 /* We are in an interpolation */) {
|
|
882
|
+
// matchedToken.kind = NATURAL_GT;
|
|
883
|
+
// } else {
|
|
884
|
+
// SwitchTo(DEFAULT);
|
|
885
|
+
// }
|
|
886
|
+
// }
|
|
887
|
+
// This cannot happen while in auto mode, since this applies only to an
|
|
888
|
+
// fmExpression inside a directive. But once we encounter the start of a
|
|
889
|
+
// directive, we can establish the tag syntax mode.
|
|
890
|
+
[
|
|
891
|
+
/>/,
|
|
892
|
+
ts.id === "bracket" ? { token: "operators" } : { token: "@brackets.directive", next: "@popall" }
|
|
893
|
+
],
|
|
894
|
+
// <EMPTY_DIRECTIVE_END : "/>" | "/]">
|
|
895
|
+
// It is a syntax error to end a tag with the wrong close token
|
|
896
|
+
// Let's indicate that to the user by not closing the tag
|
|
897
|
+
[
|
|
898
|
+
r(/(\/)(@close__id__)/),
|
|
899
|
+
[{ token: "delimiter.directive" }, { token: "@brackets.directive", next: "@popall" }]
|
|
900
|
+
]
|
|
901
|
+
],
|
|
902
|
+
// <IN_PAREN> TOKEN :
|
|
903
|
+
[s("greater_operators_token__id__")]: [
|
|
904
|
+
// <NATURAL_GT : ">">
|
|
905
|
+
[/>/, { token: "operators" }],
|
|
906
|
+
// <NATURAL_GTE : ">=">
|
|
907
|
+
[/>=/, { token: "operators" }]
|
|
908
|
+
],
|
|
909
|
+
// <NO_SPACE_EXPRESSION> TOKEN :
|
|
910
|
+
[s("no_space_expression_end_token__id__")]: [
|
|
911
|
+
// <TERMINATING_WHITESPACE : (["\n", "\r", "\t", " "])+> : FM_EXPRESSION
|
|
912
|
+
[/(?:@blank)+/, { token: "", switchTo: s("@fmExpression__id__.directive") }]
|
|
913
|
+
],
|
|
914
|
+
[s("unified_call_token__id__")]: [
|
|
915
|
+
// Special case for a call where the expression is just an ID
|
|
916
|
+
// <UNIFIED_CALL> <ID> <BLANK>+
|
|
917
|
+
[
|
|
918
|
+
/(@id)((?:@blank)+)/,
|
|
919
|
+
[{ token: "tag" }, { token: "", next: s("@fmExpression__id__.directive") }]
|
|
920
|
+
],
|
|
921
|
+
[
|
|
922
|
+
r(/(@id)(\/?)(@close__id__)/),
|
|
923
|
+
[
|
|
924
|
+
{ token: "tag" },
|
|
925
|
+
{ token: "delimiter.directive" },
|
|
926
|
+
{ token: "@brackets.directive", next: "@popall" }
|
|
927
|
+
]
|
|
928
|
+
],
|
|
929
|
+
[/./, { token: "@rematch", next: s("@noSpaceExpression__id__") }]
|
|
930
|
+
],
|
|
931
|
+
// <NO_PARSE> TOKEN :
|
|
932
|
+
[s("no_parse_token__id__")]: [
|
|
933
|
+
// <MAYBE_END :
|
|
934
|
+
// ("<" | "[")
|
|
935
|
+
// "/"
|
|
936
|
+
// ("#")?
|
|
937
|
+
// (["a"-"z", "A"-"Z"])+
|
|
938
|
+
// ( " " | "\t" | "\n" | "\r" )*
|
|
939
|
+
// (">" | "]")
|
|
940
|
+
// >
|
|
941
|
+
[
|
|
942
|
+
r(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),
|
|
943
|
+
{
|
|
944
|
+
cases: {
|
|
945
|
+
"$S2==$3": [
|
|
946
|
+
{ token: "@brackets.directive" },
|
|
947
|
+
{ token: "delimiter.directive" },
|
|
948
|
+
{ token: "tag" },
|
|
949
|
+
{ token: "" },
|
|
950
|
+
{ token: "@brackets.directive", next: "@popall" }
|
|
951
|
+
],
|
|
952
|
+
"$S2==comment": [
|
|
953
|
+
{ token: "comment" },
|
|
954
|
+
{ token: "comment" },
|
|
955
|
+
{ token: "comment" },
|
|
956
|
+
{ token: "comment" },
|
|
957
|
+
{ token: "comment" }
|
|
958
|
+
],
|
|
959
|
+
"@default": [
|
|
960
|
+
{ token: "source" },
|
|
961
|
+
{ token: "source" },
|
|
962
|
+
{ token: "source" },
|
|
963
|
+
{ token: "source" },
|
|
964
|
+
{ token: "source" }
|
|
965
|
+
]
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
],
|
|
969
|
+
// <KEEP_GOING : (~["<", "[", "-"])+>
|
|
970
|
+
// <LONE_LESS_THAN_OR_DASH : ["<", "[", "-"]>
|
|
971
|
+
[
|
|
972
|
+
/[^<\[\-]+|[<\[\-]/,
|
|
973
|
+
{
|
|
974
|
+
cases: {
|
|
975
|
+
"$S2==comment": { token: "comment" },
|
|
976
|
+
"@default": { token: "source" }
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
]
|
|
980
|
+
],
|
|
981
|
+
// <EXPRESSION_COMMENT> SKIP:
|
|
982
|
+
[s("expression_comment_token__id__")]: [
|
|
983
|
+
// < "-->" | "--]">
|
|
984
|
+
[
|
|
985
|
+
/--[>\]]/,
|
|
986
|
+
{
|
|
987
|
+
token: "comment",
|
|
988
|
+
next: "@pop"
|
|
989
|
+
}
|
|
990
|
+
],
|
|
991
|
+
// < (~["-", ">", "]"])+ >
|
|
992
|
+
// < ">">
|
|
993
|
+
// < "]">
|
|
994
|
+
// < "-">
|
|
995
|
+
[/[^\->\]]+|[>\]\-]/, { token: "comment" }]
|
|
996
|
+
],
|
|
997
|
+
[s("terse_comment_token__id__")]: [
|
|
998
|
+
// <TERSE_COMMENT_END : "-->" | "--]">
|
|
999
|
+
[r(/--(?:@close__id__)/), { token: "comment", next: "@popall" }],
|
|
1000
|
+
// <KEEP_GOING : (~["<", "[", "-"])+>
|
|
1001
|
+
// <LONE_LESS_THAN_OR_DASH : ["<", "[", "-"]>
|
|
1002
|
+
[/[^<\[\-]+|[<\[\-]/, { token: "comment" }]
|
|
1003
|
+
]
|
|
1004
|
+
}
|
|
1005
|
+
};
|
|
1006
|
+
}
|
|
1007
|
+
function createMonarchLanguageAuto(is) {
|
|
1008
|
+
const angle = createMonarchLanguage(TagSyntaxAngle, is);
|
|
1009
|
+
const bracket = createMonarchLanguage(TagSyntaxBracket, is);
|
|
1010
|
+
const auto = createMonarchLanguage(TagSyntaxAuto, is);
|
|
1011
|
+
return {
|
|
1012
|
+
// Angle and bracket syntax mode
|
|
1013
|
+
// We switch to one of these once we have determined the mode
|
|
1014
|
+
...angle,
|
|
1015
|
+
...bracket,
|
|
1016
|
+
...auto,
|
|
1017
|
+
// Settings
|
|
1018
|
+
unicode: true,
|
|
1019
|
+
includeLF: false,
|
|
1020
|
+
start: `default_auto_${is.id}`,
|
|
1021
|
+
ignoreCase: false,
|
|
1022
|
+
defaultToken: "invalid",
|
|
1023
|
+
tokenPostfix: `.freemarker2`,
|
|
1024
|
+
brackets: [
|
|
1025
|
+
{ open: "{", close: "}", token: "delimiter.curly" },
|
|
1026
|
+
{ open: "[", close: "]", token: "delimiter.square" },
|
|
1027
|
+
{ open: "(", close: ")", token: "delimiter.parenthesis" },
|
|
1028
|
+
{ open: "<", close: ">", token: "delimiter.angle" }
|
|
1029
|
+
],
|
|
1030
|
+
tokenizer: {
|
|
1031
|
+
...angle.tokenizer,
|
|
1032
|
+
...bracket.tokenizer,
|
|
1033
|
+
...auto.tokenizer
|
|
1034
|
+
}
|
|
1035
|
+
};
|
|
1036
|
+
}
|
|
1037
|
+
const TagAngleInterpolationDollar = {
|
|
1038
|
+
conf: createLangConfiguration(TagSyntaxAngle),
|
|
1039
|
+
language: createMonarchLanguage(TagSyntaxAngle, InterpolationSyntaxDollar)
|
|
1040
|
+
};
|
|
1041
|
+
const TagBracketInterpolationDollar = {
|
|
1042
|
+
conf: createLangConfiguration(TagSyntaxBracket),
|
|
1043
|
+
language: createMonarchLanguage(TagSyntaxBracket, InterpolationSyntaxDollar)
|
|
1044
|
+
};
|
|
1045
|
+
const TagAngleInterpolationBracket = {
|
|
1046
|
+
conf: createLangConfiguration(TagSyntaxAngle),
|
|
1047
|
+
language: createMonarchLanguage(TagSyntaxAngle, InterpolationSyntaxBracket)
|
|
1048
|
+
};
|
|
1049
|
+
const TagBracketInterpolationBracket = {
|
|
1050
|
+
conf: createLangConfiguration(TagSyntaxBracket),
|
|
1051
|
+
language: createMonarchLanguage(TagSyntaxBracket, InterpolationSyntaxBracket)
|
|
1052
|
+
};
|
|
1053
|
+
const TagAutoInterpolationDollar = {
|
|
1054
|
+
conf: createLangConfigurationAuto(),
|
|
1055
|
+
language: createMonarchLanguageAuto(InterpolationSyntaxDollar)
|
|
1056
|
+
};
|
|
1057
|
+
const TagAutoInterpolationBracket = {
|
|
1058
|
+
conf: createLangConfigurationAuto(),
|
|
1059
|
+
language: createMonarchLanguageAuto(InterpolationSyntaxBracket)
|
|
1060
|
+
};
|
|
1061
|
+
|
|
1062
|
+
export { TagAngleInterpolationBracket, TagAngleInterpolationDollar, TagAutoInterpolationBracket, TagAutoInterpolationDollar, TagBracketInterpolationBracket, TagBracketInterpolationDollar };
|