UNPKG

@atlaskit/editor-plugin-code-block-advanced

Version:

CodeBlockAdvanced plugin for @atlaskit/editor-core

33 lines (32 loc) 1.12 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.actionscriptLanguageSupport = actionscriptLanguageSupport; var _language = require("@codemirror/language"); var _highlight = require("@lezer/highlight"); var _parser = require("./parser"); /** * Returns a LanguageSupport instance for ActionScript. * * @returns {LanguageSupport} The language support for ActionScript. * @example * import { actionscriptLanguageSupport } from './languageSupport'; * const support = actionscriptLanguageSupport(); */ function actionscriptLanguageSupport() { // --- Syntax highlighting rules for ActionScript --- var actionScriptHighlight = (0, _highlight.styleTags)({ 'var function': _highlight.tags.controlKeyword, Comment: _highlight.tags.comment, Number: _highlight.tags.number, Identifier: _highlight.tags.variableName, String: _highlight.tags.string }); var actionscriptLanguage = _language.LRLanguage.define({ parser: _parser.parser.configure({ props: [actionScriptHighlight] }) }); return new _language.LanguageSupport(actionscriptLanguage); }