@milkdown/crepe 7.3.3
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/LICENSE +21 -0
- package/README.md +11 -0
- package/lib/apl-p0IPP13W.js +76 -0
- package/lib/asciiarmor-lJsBxlJJ.js +34 -0
- package/lib/asn1-Q9v1zIy5.js +102 -0
- package/lib/asterisk-foNkeTjy.js +273 -0
- package/lib/brainfuck-0XqyXpNS.js +35 -0
- package/lib/clike-ak6Z6Yhe.js +639 -0
- package/lib/clojure-iYO8U8Sg.js +810 -0
- package/lib/clsx-7d8NmkQq.js +21 -0
- package/lib/cmake-SVzjkxV_.js +28 -0
- package/lib/cobol-APHEnAOX.js +74 -0
- package/lib/coffeescript-KqQa0SYG.js +182 -0
- package/lib/commonlisp-bwqNqR5V.js +79 -0
- package/lib/core/crepe.d.ts +21 -0
- package/lib/core/crepe.d.ts.map +1 -0
- package/lib/core/index.d.ts +3 -0
- package/lib/core/index.d.ts.map +1 -0
- package/lib/core/slice.d.ts +12 -0
- package/lib/core/slice.d.ts.map +1 -0
- package/lib/crystal-BViWuDpA.js +217 -0
- package/lib/css-KHXHXfXg.js +1572 -0
- package/lib/cypher-XpTt4zQ3.js +69 -0
- package/lib/d-fLig6yqY.js +139 -0
- package/lib/diff-WoKGLpy6.js +18 -0
- package/lib/dockerfile-u6f6Vw2s.js +194 -0
- package/lib/dtd-SIJRUW6K.js +91 -0
- package/lib/dylan-4HCLhpWP.js +238 -0
- package/lib/ebnf-h_0lged5.js +77 -0
- package/lib/ecl-Lf4FF0lf.js +133 -0
- package/lib/eiffel-qlw8KUyf.js +112 -0
- package/lib/elm-QRnB3zXs.js +108 -0
- package/lib/erlang-fyVKb7eK.js +488 -0
- package/lib/factor-BEeN4upY.js +65 -0
- package/lib/fcl-lRek3hEb.js +106 -0
- package/lib/feature/block-edit/handle/component.d.ts +9 -0
- package/lib/feature/block-edit/handle/component.d.ts.map +1 -0
- package/lib/feature/block-edit/handle/index.d.ts +12 -0
- package/lib/feature/block-edit/handle/index.d.ts.map +1 -0
- package/lib/feature/block-edit/index.d.ts +3 -0
- package/lib/feature/block-edit/index.d.ts.map +1 -0
- package/lib/feature/block-edit/menu/component.d.ts +14 -0
- package/lib/feature/block-edit/menu/component.d.ts.map +1 -0
- package/lib/feature/block-edit/menu/config.d.ts +21 -0
- package/lib/feature/block-edit/menu/config.d.ts.map +1 -0
- package/lib/feature/block-edit/menu/icons.d.ts +14 -0
- package/lib/feature/block-edit/menu/icons.d.ts.map +1 -0
- package/lib/feature/block-edit/menu/index.d.ts +9 -0
- package/lib/feature/block-edit/menu/index.d.ts.map +1 -0
- package/lib/feature/code-mirror/index.d.ts +3 -0
- package/lib/feature/code-mirror/index.d.ts.map +1 -0
- package/lib/feature/gap-cursor/index.d.ts +3 -0
- package/lib/feature/gap-cursor/index.d.ts.map +1 -0
- package/lib/feature/image-block/index.d.ts +3 -0
- package/lib/feature/image-block/index.d.ts.map +1 -0
- package/lib/feature/index.d.ts +18 -0
- package/lib/feature/index.d.ts.map +1 -0
- package/lib/feature/link-tooltip/consts.d.ts +5 -0
- package/lib/feature/link-tooltip/consts.d.ts.map +1 -0
- package/lib/feature/link-tooltip/index.d.ts +3 -0
- package/lib/feature/link-tooltip/index.d.ts.map +1 -0
- package/lib/feature/list-item/consts.d.ts +2 -0
- package/lib/feature/list-item/consts.d.ts.map +1 -0
- package/lib/feature/list-item/index.d.ts +3 -0
- package/lib/feature/list-item/index.d.ts.map +1 -0
- package/lib/feature/placeholder/index.d.ts +10 -0
- package/lib/feature/placeholder/index.d.ts.map +1 -0
- package/lib/feature/shared.d.ts +3 -0
- package/lib/feature/shared.d.ts.map +1 -0
- package/lib/feature/toolbar/component.d.ts +13 -0
- package/lib/feature/toolbar/component.d.ts.map +1 -0
- package/lib/feature/toolbar/consts.d.ts +5 -0
- package/lib/feature/toolbar/consts.d.ts.map +1 -0
- package/lib/feature/toolbar/index.d.ts +3 -0
- package/lib/feature/toolbar/index.d.ts.map +1 -0
- package/lib/forth-ua2bRd8T.js +60 -0
- package/lib/fortran-WnF7znuN.js +443 -0
- package/lib/gas-wowve1o7.js +183 -0
- package/lib/gherkin-m7GIChu3.js +34 -0
- package/lib/go-th443Dhb.js +158 -0
- package/lib/groovy-tR4RiZnc.js +161 -0
- package/lib/haskell-jxVBofv5.js +375 -0
- package/lib/haxe-kWPI2tq3.js +390 -0
- package/lib/hooks-82sqkbtE.js +21 -0
- package/lib/http-3GIFWUlG.js +45 -0
- package/lib/icons-HYkfuR-O.js +50 -0
- package/lib/idl-PvpMZg-l.js +947 -0
- package/lib/index-0RbcZMbq.js +8 -0
- package/lib/index-4afXjFMY.js +517 -0
- package/lib/index-7MeyepDG.js +78 -0
- package/lib/index-7QgQq3x3.js +551 -0
- package/lib/index-7pgP6qYs.js +107 -0
- package/lib/index-8DvtgRVa.js +19511 -0
- package/lib/index-8Gg-jEP4.js +288 -0
- package/lib/index-8S8qcncB.js +507 -0
- package/lib/index-9A_GmGh4.js +1039 -0
- package/lib/index-EJJfYLzA.js +928 -0
- package/lib/index-Eg39w5kL.js +984 -0
- package/lib/index-FIk_7oPb.js +168 -0
- package/lib/index-LlbrXb_n.js +368 -0
- package/lib/index-MovKtgMG.js +121 -0
- package/lib/index-N9GtIS4X.js +64 -0
- package/lib/index-Pwn25-kf.js +8 -0
- package/lib/index-SdFSDosa.js +1295 -0
- package/lib/index-W5Th22-Z.js +1744 -0
- package/lib/index-XiXSFLmI.js +20975 -0
- package/lib/index-bknOViGv.js +47 -0
- package/lib/index-bkuIUPFS.js +275 -0
- package/lib/index-jPA8J9Eo.js +8 -0
- package/lib/index-lsG76a9s.js +552 -0
- package/lib/index-oTRzPo3B.js +146 -0
- package/lib/index-rrf6_6DC.js +317 -0
- package/lib/index-vJbZIHYF.js +81 -0
- package/lib/index-vPRh55CO.js +137 -0
- package/lib/index-vxy63hib.js +323 -0
- package/lib/index-wn1_LgCS.js +99 -0
- package/lib/index-xHADmDT3.js +12 -0
- package/lib/index-yt2EpMtv.js +141 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.es.js +7 -0
- package/lib/javascript-8ZHqHagw.js +758 -0
- package/lib/jinja2-vsOFe0qD.js +154 -0
- package/lib/julia-dlp_pbN1.js +241 -0
- package/lib/livescript-Gf5R-LT6.js +273 -0
- package/lib/lua-c5Y_JsBp.js +221 -0
- package/lib/mathematica-iiGTGmUs.js +35 -0
- package/lib/mbox-ZJh86H8B.js +78 -0
- package/lib/meta-tAGyVRPE.js +511 -0
- package/lib/mirc-i0qkCa0y.js +73 -0
- package/lib/mllike-Dy551fZW.js +275 -0
- package/lib/modelica-n6tGqUT9.js +94 -0
- package/lib/mscgen-aKSbB7D9.js +104 -0
- package/lib/mumps-lNiKA6sp.js +25 -0
- package/lib/nginx--YmuCfDj.js +93 -0
- package/lib/nsis-zhS8iA09.js +62 -0
- package/lib/ntriples-E3jQl3MC.js +79 -0
- package/lib/octave-EQvkGIeG.js +144 -0
- package/lib/oz-W2cpqFf6.js +152 -0
- package/lib/pascal-lCh6ouNZ.js +79 -0
- package/lib/perl-PxEQBX0B.js +915 -0
- package/lib/pig-Y_bNcrzS.js +56 -0
- package/lib/powershell-GaQP-TZr.js +249 -0
- package/lib/properties-mbRyn54L.js +26 -0
- package/lib/prosemirror-noTDkx-k.js +4 -0
- package/lib/protobuf-8CJideyJ.js +49 -0
- package/lib/puppet-ABBaChNZ.js +45 -0
- package/lib/python-sKdHg3Ka.js +321 -0
- package/lib/q-_1yG40Nm.js +89 -0
- package/lib/r-Ziz56bHT.js +108 -0
- package/lib/rpm-ORjGOHaQ.js +57 -0
- package/lib/ruby-jlbYq0dT.js +233 -0
- package/lib/sas-2n7xeUuO.js +107 -0
- package/lib/schema-tKk3m1fu.js +62 -0
- package/lib/scheme-XCs-NPeU.js +126 -0
- package/lib/shell-0_1Um7Dq.js +184 -0
- package/lib/sieve-7uyJD1x1.js +73 -0
- package/lib/simple-mode--HIzBxba.js +95 -0
- package/lib/smalltalk-PEFzrlQ-.js +48 -0
- package/lib/solr-BLBaHahN.js +41 -0
- package/lib/sparql-4F9ZWf1b.js +204 -0
- package/lib/spreadsheet-SGSo6blj.js +49 -0
- package/lib/sql-tebLBzN0.js +291 -0
- package/lib/stex-SFJcFGOO.js +130 -0
- package/lib/stylus-rwwWYWFm.js +256 -0
- package/lib/swift-eorJ0tCv.js +238 -0
- package/lib/tcl-IwXMB8U4.js +82 -0
- package/lib/textile-ok2VyjwC.js +299 -0
- package/lib/theme/classic/index.d.ts +3 -0
- package/lib/theme/classic/index.d.ts.map +1 -0
- package/lib/theme/classic-dark/index.d.ts +3 -0
- package/lib/theme/classic-dark/index.d.ts.map +1 -0
- package/lib/theme/headless/index.d.ts +3 -0
- package/lib/theme/headless/index.d.ts.map +1 -0
- package/lib/theme/index.d.ts +8 -0
- package/lib/theme/index.d.ts.map +1 -0
- package/lib/theme/shared.d.ts +3 -0
- package/lib/theme/shared.d.ts.map +1 -0
- package/lib/tiddlywiki-DLhz8_pc.js +156 -0
- package/lib/tiki-DFAqFElY.js +183 -0
- package/lib/tippy.esm-MZ2vxByW.js +1813 -0
- package/lib/toml-ryxpTZEV.js +49 -0
- package/lib/tooltip-plugin-gcwyQdiT.js +119 -0
- package/lib/troff-ZzZyvNct.js +36 -0
- package/lib/ttcn-6gvkqqpW.js +136 -0
- package/lib/ttcn-cfg-oSu-Dq5C.js +98 -0
- package/lib/turtle-10ofr5au.js +87 -0
- package/lib/use-css-light-dom-EKWZDmbJ.js +82 -0
- package/lib/utils/index.d.ts +4 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/vb-a6n6fzrD.js +74 -0
- package/lib/vbscript-dgvo8jPt.js +324 -0
- package/lib/velocity-CBncCrwO.js +97 -0
- package/lib/verilog-KlcACt6C.js +271 -0
- package/lib/vhdl-NMd7Gf35.js +117 -0
- package/lib/webidl-z1UE5DN_.js +160 -0
- package/lib/xquery-hDt5jWTp.js +431 -0
- package/lib/yacas-ftgh_qwr.js +74 -0
- package/lib/yaml-DnNTfjXK.js +53 -0
- package/lib/z80-dA1PqWe1.js +62 -0
- package/package.json +87 -0
- package/src/core/crepe.ts +98 -0
- package/src/core/index.ts +4 -0
- package/src/core/slice.ts +44 -0
- package/src/feature/block-edit/handle/component.ts +68 -0
- package/src/feature/block-edit/handle/index.ts +81 -0
- package/src/feature/block-edit/index.ts +17 -0
- package/src/feature/block-edit/menu/component.ts +210 -0
- package/src/feature/block-edit/menu/config.ts +335 -0
- package/src/feature/block-edit/menu/icons.ts +171 -0
- package/src/feature/block-edit/menu/index.ts +113 -0
- package/src/feature/block-edit/style.css +126 -0
- package/src/feature/code-mirror/index.ts +60 -0
- package/src/feature/code-mirror/style.css +159 -0
- package/src/feature/gap-cursor/index.ts +31 -0
- package/src/feature/image-block/index.ts +59 -0
- package/src/feature/image-block/style.css +215 -0
- package/src/feature/index.ts +66 -0
- package/src/feature/link-tooltip/consts.ts +47 -0
- package/src/feature/link-tooltip/index.ts +22 -0
- package/src/feature/link-tooltip/style.css +107 -0
- package/src/feature/list-item/consts.ts +15 -0
- package/src/feature/list-item/index.ts +30 -0
- package/src/feature/list-item/style.css +23 -0
- package/src/feature/placeholder/index.ts +87 -0
- package/src/feature/placeholder/style.css +9 -0
- package/src/feature/shared.ts +4 -0
- package/src/feature/toolbar/component.ts +101 -0
- package/src/feature/toolbar/consts.ts +26 -0
- package/src/feature/toolbar/index.ts +92 -0
- package/src/feature/toolbar/style.css +37 -0
- package/src/index.ts +5 -0
- package/src/theme/classic/index.ts +12 -0
- package/src/theme/classic/style.css +192 -0
- package/src/theme/classic-dark/index.ts +12 -0
- package/src/theme/classic-dark/style.css +197 -0
- package/src/theme/headless/index.ts +9 -0
- package/src/theme/index.ts +26 -0
- package/src/theme/shared.ts +4 -0
- package/src/utils/index.ts +12 -0
- package/src/vite-env.d.ts +2 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { s as e } from "./simple-mode--HIzBxba.js";
|
|
2
|
+
const n = e({
|
|
3
|
+
start: [
|
|
4
|
+
// Numbers
|
|
5
|
+
{ regex: /(?:[+-]?)(?:0x[\d,a-f]+)|(?:0o[0-7]+)|(?:0b[0,1]+)|(?:\d+.?\d*)/, token: "number" },
|
|
6
|
+
// Strings
|
|
7
|
+
{ regex: /"(?:[^\\"]|\\.)*"?/, token: "string" },
|
|
8
|
+
{ regex: /'(?:[^\\']|\\.)*'?/, token: "string" },
|
|
9
|
+
{ regex: /`(?:[^\\`]|\\.)*`?/, token: "string" },
|
|
10
|
+
// Compile Time Commands
|
|
11
|
+
{ regex: /^\s*(?:\!(addincludedir|addplugindir|appendfile|assert|cd|define|delfile|echo|error|execute|finalize|getdllversion|gettlbversion|include|insertmacro|macro|macroend|makensis|packhdr|pragma|searchparse|searchreplace|system|tempfile|undef|uninstfinalize|verbose|warning))\b/i, token: "keyword" },
|
|
12
|
+
// Conditional Compilation
|
|
13
|
+
{ regex: /^\s*(?:\!(if(?:n?def)?|ifmacron?def|macro))\b/i, token: "keyword", indent: !0 },
|
|
14
|
+
{ regex: /^\s*(?:\!(else|endif|macroend))\b/i, token: "keyword", dedent: !0 },
|
|
15
|
+
// Runtime Commands
|
|
16
|
+
{ regex: /^\s*(?:Abort|AddBrandingImage|AddSize|AllowRootDirInstall|AllowSkipFiles|AutoCloseWindow|BGFont|BGGradient|BrandingText|BringToFront|Call|CallInstDLL|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|CRCCheck|CreateDirectory|CreateFont|CreateShortCut|Delete|DeleteINISec|DeleteINIStr|DeleteRegKey|DeleteRegValue|DetailPrint|DetailsButtonText|DirText|DirVar|DirVerify|EnableWindow|EnumRegKey|EnumRegValue|Exch|Exec|ExecShell|ExecShellWait|ExecWait|ExpandEnvStrings|File|FileBufSize|FileClose|FileErrorText|FileOpen|FileRead|FileReadByte|FileReadUTF16LE|FileReadWord|FileWriteUTF16LE|FileSeek|FileWrite|FileWriteByte|FileWriteWord|FindClose|FindFirst|FindNext|FindWindow|FlushINI|GetCurInstType|GetCurrentAddress|GetDlgItem|GetDLLVersion|GetDLLVersionLocal|GetErrorLevel|GetFileTime|GetFileTimeLocal|GetFullPathName|GetFunctionAddress|GetInstDirError|GetKnownFolderPath|GetLabelAddress|GetTempFileName|GetWinVer|Goto|HideWindow|Icon|IfAbort|IfErrors|IfFileExists|IfRebootFlag|IfRtlLanguage|IfShellVarContextAll|IfSilent|InitPluginsDir|InstallButtonText|InstallColors|InstallDir|InstallDirRegKey|InstProgressFlags|InstType|InstTypeGetText|InstTypeSetText|Int64Cmp|Int64CmpU|Int64Fmt|IntCmp|IntCmpU|IntFmt|IntOp|IntPtrCmp|IntPtrCmpU|IntPtrOp|IsWindow|LangString|LicenseBkColor|LicenseData|LicenseForceSelection|LicenseLangString|LicenseText|LoadAndSetImage|LoadLanguageFile|LockWindow|LogSet|LogText|ManifestDPIAware|ManifestLongPathAware|ManifestMaxVersionTested|ManifestSupportedOS|MessageBox|MiscButtonText|Name|Nop|OutFile|Page|PageCallbacks|PEAddResource|PEDllCharacteristics|PERemoveResource|PESubsysVer|Pop|Push|Quit|ReadEnvStr|ReadINIStr|ReadRegDWORD|ReadRegStr|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|RMDir|SearchPath|SectionGetFlags|SectionGetInstTypes|SectionGetSize|SectionGetText|SectionIn|SectionSetFlags|SectionSetInstTypes|SectionSetSize|SectionSetText|SendMessage|SetAutoClose|SetBrandingImage|SetCompress|SetCompressor|SetCompressorDictSize|SetCtlColors|SetCurInstType|SetDatablockOptimize|SetDateSave|SetDetailsPrint|SetDetailsView|SetErrorLevel|SetErrors|SetFileAttributes|SetFont|SetOutPath|SetOverwrite|SetRebootFlag|SetRegView|SetShellVarContext|SetSilent|ShowInstDetails|ShowUninstDetails|ShowWindow|SilentInstall|SilentUnInstall|Sleep|SpaceTexts|StrCmp|StrCmpS|StrCpy|StrLen|SubCaption|Target|Unicode|UninstallButtonText|UninstallCaption|UninstallIcon|UninstallSubCaption|UninstallText|UninstPage|UnRegDLL|Var|VIAddVersionKey|VIFileVersion|VIProductVersion|WindowIcon|WriteINIStr|WriteRegBin|WriteRegDWORD|WriteRegExpandStr|WriteRegMultiStr|WriteRegNone|WriteRegStr|WriteUninstaller|XPStyle)\b/i, token: "keyword" },
|
|
17
|
+
{ regex: /^\s*(?:Function|PageEx|Section(?:Group)?)\b/i, token: "keyword", indent: !0 },
|
|
18
|
+
{ regex: /^\s*(?:(Function|PageEx|Section(?:Group)?)End)\b/i, token: "keyword", dedent: !0 },
|
|
19
|
+
// Command Options
|
|
20
|
+
{ regex: /\b(?:ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HIDDEN|HKCC|HKCR(32|64)?|HKCU(32|64)?|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM(32|64)?|HKPD|HKU|IDABORT|IDCANCEL|IDD_DIR|IDD_INST|IDD_INSTFILES|IDD_LICENSE|IDD_SELCOM|IDD_UNINST|IDD_VERIFY|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|MB_YESNOCANCEL|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SW_HIDE|SW_SHOWDEFAULT|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_SHOWNORMAL|SYSTEM|TEMPORARY)\b/i, token: "atom" },
|
|
21
|
+
{ regex: /\b(?:admin|all|amd64-unicode|auto|both|bottom|bzip2|components|current|custom|directory|false|force|hide|highest|ifdiff|ifnewer|instfiles|lastused|leave|left|license|listonly|lzma|nevershow|none|normal|notset|off|on|right|show|silent|silentlog|textonly|top|true|try|un\.components|un\.custom|un\.directory|un\.instfiles|un\.license|uninstConfirm|user|Win10|Win7|Win8|WinVista|x-86-(ansi|unicode)|zlib)\b/i, token: "builtin" },
|
|
22
|
+
// LogicLib.nsh
|
|
23
|
+
{ regex: /\$\{(?:And(?:If(?:Not)?|Unless)|Break|Case(?:2|3|4|5|Else)?|Continue|Default|Do(?:Until|While)?|Else(?:If(?:Not)?|Unless)?|End(?:If|Select|Switch)|Exit(?:Do|For|While)|For(?:Each)?|If(?:Cmd|Not(?:Then)?|Then)?|Loop(?:Until|While)?|Or(?:If(?:Not)?|Unless)|Select|Switch|Unless|While)\}/i, token: "variable-2", indent: !0 },
|
|
24
|
+
// FileFunc.nsh
|
|
25
|
+
{ regex: /\$\{(?:BannerTrimPath|DirState|DriveSpace|Get(BaseName|Drives|ExeName|ExePath|FileAttributes|FileExt|FileName|FileVersion|Options|OptionsS|Parameters|Parent|Root|Size|Time)|Locate|RefreshShellIcons)\}/i, token: "variable-2", dedent: !0 },
|
|
26
|
+
// Memento.nsh
|
|
27
|
+
{ regex: /\$\{(?:Memento(?:Section(?:Done|End|Restore|Save)?|UnselectedSection))\}/i, token: "variable-2", dedent: !0 },
|
|
28
|
+
// TextFunc.nsh
|
|
29
|
+
{ regex: /\$\{(?:Config(?:Read|ReadS|Write|WriteS)|File(?:Join|ReadFromEnd|Recode)|Line(?:Find|Read|Sum)|Text(?:Compare|CompareS)|TrimNewLines)\}/i, token: "variable-2", dedent: !0 },
|
|
30
|
+
// WinVer.nsh
|
|
31
|
+
{ regex: /\$\{(?:(?:At(?:Least|Most)|Is)(?:ServicePack|Win(?:7|8|10|95|98|200(?:0|3|8(?:R2)?)|ME|NT4|Vista|XP))|Is(?:NT|Server))\}/i, token: "variable", dedent: !0 },
|
|
32
|
+
// WordFunc.nsh
|
|
33
|
+
{ regex: /\$\{(?:StrFilterS?|Version(?:Compare|Convert)|Word(?:AddS?|Find(?:(?:2|3)X)?S?|InsertS?|ReplaceS?))\}/i, token: "keyword", dedent: !0 },
|
|
34
|
+
// x64.nsh
|
|
35
|
+
{ regex: /\$\{(?:RunningX64)\}/i, token: "variable", dedent: !0 },
|
|
36
|
+
{ regex: /\$\{(?:Disable|Enable)X64FSRedirection\}/i, token: "keyword", dedent: !0 },
|
|
37
|
+
// Line Comment
|
|
38
|
+
{ regex: /(#|;).*/, token: "comment" },
|
|
39
|
+
// Block Comment
|
|
40
|
+
{ regex: /\/\*/, token: "comment", next: "comment" },
|
|
41
|
+
// Operator
|
|
42
|
+
{ regex: /[-+\/*=<>!]+/, token: "operator" },
|
|
43
|
+
// Variable
|
|
44
|
+
{ regex: /\$\w[\w\.]*/, token: "variable" },
|
|
45
|
+
// Constant
|
|
46
|
+
{ regex: /\${[\!\w\.:-]+}/, token: "variableName.constant" },
|
|
47
|
+
// Language String
|
|
48
|
+
{ regex: /\$\([\!\w\.:-]+\)/, token: "atom" }
|
|
49
|
+
],
|
|
50
|
+
comment: [
|
|
51
|
+
{ regex: /.*?\*\//, token: "comment", next: "start" },
|
|
52
|
+
{ regex: /.*/, token: "comment" }
|
|
53
|
+
],
|
|
54
|
+
languageData: {
|
|
55
|
+
name: "nsis",
|
|
56
|
+
indentOnInput: /^\s*((Function|PageEx|Section|Section(Group)?)End|(\!(endif|macroend))|\$\{(End(If|Unless|While)|Loop(Until)|Next)\})$/i,
|
|
57
|
+
commentTokens: { line: "#", block: { open: "/*", close: "*/" } }
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
export {
|
|
61
|
+
n as nsis
|
|
62
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
var _ = {
|
|
2
|
+
PRE_SUBJECT: 0,
|
|
3
|
+
WRITING_SUB_URI: 1,
|
|
4
|
+
WRITING_BNODE_URI: 2,
|
|
5
|
+
PRE_PRED: 3,
|
|
6
|
+
WRITING_PRED_URI: 4,
|
|
7
|
+
PRE_OBJ: 5,
|
|
8
|
+
WRITING_OBJ_URI: 6,
|
|
9
|
+
WRITING_OBJ_BNODE: 7,
|
|
10
|
+
WRITING_OBJ_LITERAL: 8,
|
|
11
|
+
WRITING_LIT_LANG: 9,
|
|
12
|
+
WRITING_LIT_TYPE: 10,
|
|
13
|
+
POST_OBJ: 11,
|
|
14
|
+
ERROR: 12
|
|
15
|
+
};
|
|
16
|
+
function T(e, I) {
|
|
17
|
+
var R = e.location, i;
|
|
18
|
+
R == _.PRE_SUBJECT && I == "<" ? i = _.WRITING_SUB_URI : R == _.PRE_SUBJECT && I == "_" ? i = _.WRITING_BNODE_URI : R == _.PRE_PRED && I == "<" ? i = _.WRITING_PRED_URI : R == _.PRE_OBJ && I == "<" ? i = _.WRITING_OBJ_URI : R == _.PRE_OBJ && I == "_" ? i = _.WRITING_OBJ_BNODE : R == _.PRE_OBJ && I == '"' ? i = _.WRITING_OBJ_LITERAL : R == _.WRITING_SUB_URI && I == ">" || R == _.WRITING_BNODE_URI && I == " " ? i = _.PRE_PRED : R == _.WRITING_PRED_URI && I == ">" ? i = _.PRE_OBJ : R == _.WRITING_OBJ_URI && I == ">" || R == _.WRITING_OBJ_BNODE && I == " " || R == _.WRITING_OBJ_LITERAL && I == '"' || R == _.WRITING_LIT_LANG && I == " " || R == _.WRITING_LIT_TYPE && I == ">" ? i = _.POST_OBJ : R == _.WRITING_OBJ_LITERAL && I == "@" ? i = _.WRITING_LIT_LANG : R == _.WRITING_OBJ_LITERAL && I == "^" ? i = _.WRITING_LIT_TYPE : I == " " && (R == _.PRE_SUBJECT || R == _.PRE_PRED || R == _.PRE_OBJ || R == _.POST_OBJ) ? i = R : R == _.POST_OBJ && I == "." ? i = _.PRE_SUBJECT : i = _.ERROR, e.location = i;
|
|
19
|
+
}
|
|
20
|
+
const u = {
|
|
21
|
+
name: "ntriples",
|
|
22
|
+
startState: function() {
|
|
23
|
+
return {
|
|
24
|
+
location: _.PRE_SUBJECT,
|
|
25
|
+
uris: [],
|
|
26
|
+
anchors: [],
|
|
27
|
+
bnodes: [],
|
|
28
|
+
langs: [],
|
|
29
|
+
types: []
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
token: function(e, I) {
|
|
33
|
+
var R = e.next();
|
|
34
|
+
if (R == "<") {
|
|
35
|
+
T(I, R);
|
|
36
|
+
var i = "";
|
|
37
|
+
return e.eatWhile(function(n) {
|
|
38
|
+
return n != "#" && n != ">" ? (i += n, !0) : !1;
|
|
39
|
+
}), I.uris.push(i), e.match("#", !1) || (e.next(), T(I, ">")), "variable";
|
|
40
|
+
}
|
|
41
|
+
if (R == "#") {
|
|
42
|
+
var r = "";
|
|
43
|
+
return e.eatWhile(function(n) {
|
|
44
|
+
return n != ">" && n != " " ? (r += n, !0) : !1;
|
|
45
|
+
}), I.anchors.push(r), "url";
|
|
46
|
+
}
|
|
47
|
+
if (R == ">")
|
|
48
|
+
return T(I, ">"), "variable";
|
|
49
|
+
if (R == "_") {
|
|
50
|
+
T(I, R);
|
|
51
|
+
var f = "";
|
|
52
|
+
return e.eatWhile(function(n) {
|
|
53
|
+
return n != " " ? (f += n, !0) : !1;
|
|
54
|
+
}), I.bnodes.push(f), e.next(), T(I, " "), "builtin";
|
|
55
|
+
}
|
|
56
|
+
if (R == '"')
|
|
57
|
+
return T(I, R), e.eatWhile(function(n) {
|
|
58
|
+
return n != '"';
|
|
59
|
+
}), e.next(), e.peek() != "@" && e.peek() != "^" && T(I, '"'), "string";
|
|
60
|
+
if (R == "@") {
|
|
61
|
+
T(I, "@");
|
|
62
|
+
var E = "";
|
|
63
|
+
return e.eatWhile(function(n) {
|
|
64
|
+
return n != " " ? (E += n, !0) : !1;
|
|
65
|
+
}), I.langs.push(E), e.next(), T(I, " "), "string.special";
|
|
66
|
+
}
|
|
67
|
+
if (R == "^") {
|
|
68
|
+
e.next(), T(I, "^");
|
|
69
|
+
var l = "";
|
|
70
|
+
return e.eatWhile(function(n) {
|
|
71
|
+
return n != ">" ? (l += n, !0) : !1;
|
|
72
|
+
}), I.types.push(l), e.next(), T(I, ">"), "variable";
|
|
73
|
+
}
|
|
74
|
+
R == " " && T(I, R), R == "." && T(I, R);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
export {
|
|
78
|
+
u as ntriples
|
|
79
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
function t(e) {
|
|
2
|
+
return new RegExp("^((" + e.join(")|(") + "))\\b");
|
|
3
|
+
}
|
|
4
|
+
var f = new RegExp("^[\\+\\-\\*/&|\\^~<>!@'\\\\]"), u = new RegExp("^[\\(\\[\\{\\},:=;\\.]"), a = new RegExp("^((==)|(~=)|(<=)|(>=)|(<<)|(>>)|(\\.[\\+\\-\\*/\\^\\\\]))"), l = new RegExp("^((!=)|(\\+=)|(\\-=)|(\\*=)|(/=)|(&=)|(\\|=)|(\\^=))"), c = new RegExp("^((>>=)|(<<=))"), p = new RegExp("^[\\]\\)]"), d = new RegExp("^[_A-Za-z¡-][_A-Za-z0-9¡-]*"), s = t([
|
|
5
|
+
"error",
|
|
6
|
+
"eval",
|
|
7
|
+
"function",
|
|
8
|
+
"abs",
|
|
9
|
+
"acos",
|
|
10
|
+
"atan",
|
|
11
|
+
"asin",
|
|
12
|
+
"cos",
|
|
13
|
+
"cosh",
|
|
14
|
+
"exp",
|
|
15
|
+
"log",
|
|
16
|
+
"prod",
|
|
17
|
+
"sum",
|
|
18
|
+
"log10",
|
|
19
|
+
"max",
|
|
20
|
+
"min",
|
|
21
|
+
"sign",
|
|
22
|
+
"sin",
|
|
23
|
+
"sinh",
|
|
24
|
+
"sqrt",
|
|
25
|
+
"tan",
|
|
26
|
+
"reshape",
|
|
27
|
+
"break",
|
|
28
|
+
"zeros",
|
|
29
|
+
"default",
|
|
30
|
+
"margin",
|
|
31
|
+
"round",
|
|
32
|
+
"ones",
|
|
33
|
+
"rand",
|
|
34
|
+
"syn",
|
|
35
|
+
"ceil",
|
|
36
|
+
"floor",
|
|
37
|
+
"size",
|
|
38
|
+
"clear",
|
|
39
|
+
"zeros",
|
|
40
|
+
"eye",
|
|
41
|
+
"mean",
|
|
42
|
+
"std",
|
|
43
|
+
"cov",
|
|
44
|
+
"det",
|
|
45
|
+
"eig",
|
|
46
|
+
"inv",
|
|
47
|
+
"norm",
|
|
48
|
+
"rank",
|
|
49
|
+
"trace",
|
|
50
|
+
"expm",
|
|
51
|
+
"logm",
|
|
52
|
+
"sqrtm",
|
|
53
|
+
"linspace",
|
|
54
|
+
"plot",
|
|
55
|
+
"title",
|
|
56
|
+
"xlabel",
|
|
57
|
+
"ylabel",
|
|
58
|
+
"legend",
|
|
59
|
+
"text",
|
|
60
|
+
"grid",
|
|
61
|
+
"meshgrid",
|
|
62
|
+
"mesh",
|
|
63
|
+
"num2str",
|
|
64
|
+
"fft",
|
|
65
|
+
"ifft",
|
|
66
|
+
"arrayfun",
|
|
67
|
+
"cellfun",
|
|
68
|
+
"input",
|
|
69
|
+
"fliplr",
|
|
70
|
+
"flipud",
|
|
71
|
+
"ismember"
|
|
72
|
+
]), h = t([
|
|
73
|
+
"return",
|
|
74
|
+
"case",
|
|
75
|
+
"switch",
|
|
76
|
+
"else",
|
|
77
|
+
"elseif",
|
|
78
|
+
"end",
|
|
79
|
+
"endif",
|
|
80
|
+
"endfunction",
|
|
81
|
+
"if",
|
|
82
|
+
"otherwise",
|
|
83
|
+
"do",
|
|
84
|
+
"for",
|
|
85
|
+
"while",
|
|
86
|
+
"try",
|
|
87
|
+
"catch",
|
|
88
|
+
"classdef",
|
|
89
|
+
"properties",
|
|
90
|
+
"events",
|
|
91
|
+
"methods",
|
|
92
|
+
"global",
|
|
93
|
+
"persistent",
|
|
94
|
+
"endfor",
|
|
95
|
+
"endwhile",
|
|
96
|
+
"printf",
|
|
97
|
+
"sprintf",
|
|
98
|
+
"disp",
|
|
99
|
+
"until",
|
|
100
|
+
"continue",
|
|
101
|
+
"pkg"
|
|
102
|
+
]);
|
|
103
|
+
function o(e, n) {
|
|
104
|
+
return !e.sol() && e.peek() === "'" ? (e.next(), n.tokenize = i, "operator") : (n.tokenize = i, i(e, n));
|
|
105
|
+
}
|
|
106
|
+
function m(e, n) {
|
|
107
|
+
return e.match(/^.*%}/) ? (n.tokenize = i, "comment") : (e.skipToEnd(), "comment");
|
|
108
|
+
}
|
|
109
|
+
function i(e, n) {
|
|
110
|
+
if (e.eatSpace())
|
|
111
|
+
return null;
|
|
112
|
+
if (e.match("%{"))
|
|
113
|
+
return n.tokenize = m, e.skipToEnd(), "comment";
|
|
114
|
+
if (e.match(/^[%#]/))
|
|
115
|
+
return e.skipToEnd(), "comment";
|
|
116
|
+
if (e.match(/^[0-9\.+-]/, !1)) {
|
|
117
|
+
if (e.match(/^[+-]?0x[0-9a-fA-F]+[ij]?/))
|
|
118
|
+
return e.tokenize = i, "number";
|
|
119
|
+
if (e.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?[ij]?/) || e.match(/^[+-]?\d+([EeDd][+-]?\d+)?[ij]?/))
|
|
120
|
+
return "number";
|
|
121
|
+
}
|
|
122
|
+
if (e.match(t(["nan", "NaN", "inf", "Inf"])))
|
|
123
|
+
return "number";
|
|
124
|
+
var r = e.match(/^"(?:[^"]|"")*("|$)/) || e.match(/^'(?:[^']|'')*('|$)/);
|
|
125
|
+
return r ? r[1] ? "string" : "error" : e.match(h) ? "keyword" : e.match(s) ? "builtin" : e.match(d) ? "variable" : e.match(f) || e.match(a) ? "operator" : e.match(u) || e.match(l) || e.match(c) ? null : e.match(p) ? (n.tokenize = o, null) : (e.next(), "error");
|
|
126
|
+
}
|
|
127
|
+
const g = {
|
|
128
|
+
name: "octave",
|
|
129
|
+
startState: function() {
|
|
130
|
+
return {
|
|
131
|
+
tokenize: i
|
|
132
|
+
};
|
|
133
|
+
},
|
|
134
|
+
token: function(e, n) {
|
|
135
|
+
var r = n.tokenize(e, n);
|
|
136
|
+
return (r === "number" || r === "variable") && (n.tokenize = o), r;
|
|
137
|
+
},
|
|
138
|
+
languageData: {
|
|
139
|
+
commentTokens: { line: "%" }
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
export {
|
|
143
|
+
g as octave
|
|
144
|
+
};
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
function o(e) {
|
|
2
|
+
return new RegExp("^((" + e.join(")|(") + "))\\b");
|
|
3
|
+
}
|
|
4
|
+
var k = /[\^@!\|<>#~\.\*\-\+\\/,=]/, s = /(<-)|(:=)|(=<)|(>=)|(<=)|(<:)|(>:)|(=:)|(\\=)|(\\=:)|(!!)|(==)|(::)/, p = /(:::)|(\.\.\.)|(=<:)|(>=:)/, f = [
|
|
5
|
+
"in",
|
|
6
|
+
"then",
|
|
7
|
+
"else",
|
|
8
|
+
"of",
|
|
9
|
+
"elseof",
|
|
10
|
+
"elsecase",
|
|
11
|
+
"elseif",
|
|
12
|
+
"catch",
|
|
13
|
+
"finally",
|
|
14
|
+
"with",
|
|
15
|
+
"require",
|
|
16
|
+
"prepare",
|
|
17
|
+
"import",
|
|
18
|
+
"export",
|
|
19
|
+
"define",
|
|
20
|
+
"do"
|
|
21
|
+
], l = ["end"], z = o(["true", "false", "nil", "unit"]), m = o([
|
|
22
|
+
"andthen",
|
|
23
|
+
"at",
|
|
24
|
+
"attr",
|
|
25
|
+
"declare",
|
|
26
|
+
"feat",
|
|
27
|
+
"from",
|
|
28
|
+
"lex",
|
|
29
|
+
"mod",
|
|
30
|
+
"div",
|
|
31
|
+
"mode",
|
|
32
|
+
"orelse",
|
|
33
|
+
"parser",
|
|
34
|
+
"prod",
|
|
35
|
+
"prop",
|
|
36
|
+
"scanner",
|
|
37
|
+
"self",
|
|
38
|
+
"syn",
|
|
39
|
+
"token"
|
|
40
|
+
]), v = o([
|
|
41
|
+
"local",
|
|
42
|
+
"proc",
|
|
43
|
+
"fun",
|
|
44
|
+
"case",
|
|
45
|
+
"class",
|
|
46
|
+
"if",
|
|
47
|
+
"cond",
|
|
48
|
+
"or",
|
|
49
|
+
"dis",
|
|
50
|
+
"choice",
|
|
51
|
+
"not",
|
|
52
|
+
"thread",
|
|
53
|
+
"try",
|
|
54
|
+
"raise",
|
|
55
|
+
"lock",
|
|
56
|
+
"for",
|
|
57
|
+
"suchthat",
|
|
58
|
+
"meth",
|
|
59
|
+
"functor"
|
|
60
|
+
]), d = o(f), h = o(l);
|
|
61
|
+
function i(e, n) {
|
|
62
|
+
if (e.eatSpace())
|
|
63
|
+
return null;
|
|
64
|
+
if (e.match(/[{}]/))
|
|
65
|
+
return "bracket";
|
|
66
|
+
if (e.match("[]"))
|
|
67
|
+
return "keyword";
|
|
68
|
+
if (e.match(p) || e.match(s))
|
|
69
|
+
return "operator";
|
|
70
|
+
if (e.match(z))
|
|
71
|
+
return "atom";
|
|
72
|
+
var t = e.match(v);
|
|
73
|
+
if (t)
|
|
74
|
+
return n.doInCurrentLine ? n.doInCurrentLine = !1 : n.currentIndent++, t[0] == "proc" || t[0] == "fun" ? n.tokenize = x : t[0] == "class" ? n.tokenize = g : t[0] == "meth" && (n.tokenize = w), "keyword";
|
|
75
|
+
if (e.match(d) || e.match(m))
|
|
76
|
+
return "keyword";
|
|
77
|
+
if (e.match(h))
|
|
78
|
+
return n.currentIndent--, "keyword";
|
|
79
|
+
var r = e.next();
|
|
80
|
+
if (r == '"' || r == "'")
|
|
81
|
+
return n.tokenize = y(r), n.tokenize(e, n);
|
|
82
|
+
if (/[~\d]/.test(r)) {
|
|
83
|
+
if (r == "~")
|
|
84
|
+
if (/^[0-9]/.test(e.peek())) {
|
|
85
|
+
if (e.next() == "0" && e.match(/^[xX][0-9a-fA-F]+/) || e.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/))
|
|
86
|
+
return "number";
|
|
87
|
+
} else
|
|
88
|
+
return null;
|
|
89
|
+
return r == "0" && e.match(/^[xX][0-9a-fA-F]+/) || e.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/) ? "number" : null;
|
|
90
|
+
}
|
|
91
|
+
return r == "%" ? (e.skipToEnd(), "comment") : r == "/" && e.eat("*") ? (n.tokenize = a, a(e, n)) : k.test(r) ? "operator" : (e.eatWhile(/\w/), "variable");
|
|
92
|
+
}
|
|
93
|
+
function g(e, n) {
|
|
94
|
+
return e.eatSpace() ? null : (e.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)/), n.tokenize = i, "type");
|
|
95
|
+
}
|
|
96
|
+
function w(e, n) {
|
|
97
|
+
return e.eatSpace() ? null : (e.match(/([a-zA-Z][A-Za-z0-9_]*)|(`.+`)/), n.tokenize = i, "def");
|
|
98
|
+
}
|
|
99
|
+
function x(e, n) {
|
|
100
|
+
return e.eatSpace() ? null : !n.hasPassedFirstStage && e.eat("{") ? (n.hasPassedFirstStage = !0, "bracket") : n.hasPassedFirstStage ? (e.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)|\$/), n.hasPassedFirstStage = !1, n.tokenize = i, "def") : (n.tokenize = i, null);
|
|
101
|
+
}
|
|
102
|
+
function a(e, n) {
|
|
103
|
+
for (var t = !1, r; r = e.next(); ) {
|
|
104
|
+
if (r == "/" && t) {
|
|
105
|
+
n.tokenize = i;
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
t = r == "*";
|
|
109
|
+
}
|
|
110
|
+
return "comment";
|
|
111
|
+
}
|
|
112
|
+
function y(e) {
|
|
113
|
+
return function(n, t) {
|
|
114
|
+
for (var r = !1, u, c = !1; (u = n.next()) != null; ) {
|
|
115
|
+
if (u == e && !r) {
|
|
116
|
+
c = !0;
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
r = !r && u == "\\";
|
|
120
|
+
}
|
|
121
|
+
return (c || !r) && (t.tokenize = i), "string";
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
function b() {
|
|
125
|
+
var e = f.concat(l);
|
|
126
|
+
return new RegExp("[\\[\\]]|(" + e.join("|") + ")$");
|
|
127
|
+
}
|
|
128
|
+
const I = {
|
|
129
|
+
name: "oz",
|
|
130
|
+
startState: function() {
|
|
131
|
+
return {
|
|
132
|
+
tokenize: i,
|
|
133
|
+
currentIndent: 0,
|
|
134
|
+
doInCurrentLine: !1,
|
|
135
|
+
hasPassedFirstStage: !1
|
|
136
|
+
};
|
|
137
|
+
},
|
|
138
|
+
token: function(e, n) {
|
|
139
|
+
return e.sol() && (n.doInCurrentLine = 0), n.tokenize(e, n);
|
|
140
|
+
},
|
|
141
|
+
indent: function(e, n, t) {
|
|
142
|
+
var r = n.replace(/^\s+|\s+$/g, "");
|
|
143
|
+
return r.match(h) || r.match(d) || r.match(/(\[])/) ? t.unit * (e.currentIndent - 1) : e.currentIndent < 0 ? 0 : e.currentIndent * t.unit;
|
|
144
|
+
},
|
|
145
|
+
languageData: {
|
|
146
|
+
indentOnInut: b(),
|
|
147
|
+
commentTokens: { line: "%", block: { open: "/*", close: "*/" } }
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
export {
|
|
151
|
+
I as oz
|
|
152
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
function c(r) {
|
|
2
|
+
for (var n = {}, e = r.split(" "), t = 0; t < e.length; ++t)
|
|
3
|
+
n[e[t]] = !0;
|
|
4
|
+
return n;
|
|
5
|
+
}
|
|
6
|
+
var s = c(
|
|
7
|
+
"absolute and array asm begin case const constructor destructor div do downto else end file for function goto if implementation in inherited inline interface label mod nil not object of operator or packed procedure program record reintroduce repeat self set shl shr string then to type unit until uses var while with xor as class dispinterface except exports finalization finally initialization inline is library on out packed property raise resourcestring threadvar try absolute abstract alias assembler bitpacked break cdecl continue cppdecl cvar default deprecated dynamic enumerator experimental export external far far16 forward generic helper implements index interrupt iocheck local message name near nodefault noreturn nostackframe oldfpccall otherwise overload override pascal platform private protected public published read register reintroduce result safecall saveregisters softfloat specialize static stdcall stored strict unaligned unimplemented varargs virtual write"
|
|
8
|
+
), f = { null: !0 }, a = /[+\-*&%=<>!?|\/]/;
|
|
9
|
+
function d(r, n) {
|
|
10
|
+
var e = r.next();
|
|
11
|
+
if (e == "#" && n.startOfLine)
|
|
12
|
+
return r.skipToEnd(), "meta";
|
|
13
|
+
if (e == '"' || e == "'")
|
|
14
|
+
return n.tokenize = p(e), n.tokenize(r, n);
|
|
15
|
+
if (e == "(" && r.eat("*"))
|
|
16
|
+
return n.tokenize = l, l(r, n);
|
|
17
|
+
if (e == "{")
|
|
18
|
+
return n.tokenize = u, u(r, n);
|
|
19
|
+
if (/[\[\]\(\),;\:\.]/.test(e))
|
|
20
|
+
return null;
|
|
21
|
+
if (/\d/.test(e))
|
|
22
|
+
return r.eatWhile(/[\w\.]/), "number";
|
|
23
|
+
if (e == "/" && r.eat("/"))
|
|
24
|
+
return r.skipToEnd(), "comment";
|
|
25
|
+
if (a.test(e))
|
|
26
|
+
return r.eatWhile(a), "operator";
|
|
27
|
+
r.eatWhile(/[\w\$_]/);
|
|
28
|
+
var t = r.current();
|
|
29
|
+
return s.propertyIsEnumerable(t) ? "keyword" : f.propertyIsEnumerable(t) ? "atom" : "variable";
|
|
30
|
+
}
|
|
31
|
+
function p(r) {
|
|
32
|
+
return function(n, e) {
|
|
33
|
+
for (var t = !1, i, o = !1; (i = n.next()) != null; ) {
|
|
34
|
+
if (i == r && !t) {
|
|
35
|
+
o = !0;
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
t = !t && i == "\\";
|
|
39
|
+
}
|
|
40
|
+
return (o || !t) && (e.tokenize = null), "string";
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function l(r, n) {
|
|
44
|
+
for (var e = !1, t; t = r.next(); ) {
|
|
45
|
+
if (t == ")" && e) {
|
|
46
|
+
n.tokenize = null;
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
e = t == "*";
|
|
50
|
+
}
|
|
51
|
+
return "comment";
|
|
52
|
+
}
|
|
53
|
+
function u(r, n) {
|
|
54
|
+
for (var e; e = r.next(); )
|
|
55
|
+
if (e == "}") {
|
|
56
|
+
n.tokenize = null;
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
return "comment";
|
|
60
|
+
}
|
|
61
|
+
const k = {
|
|
62
|
+
name: "pascal",
|
|
63
|
+
startState: function() {
|
|
64
|
+
return { tokenize: null };
|
|
65
|
+
},
|
|
66
|
+
token: function(r, n) {
|
|
67
|
+
if (r.eatSpace())
|
|
68
|
+
return null;
|
|
69
|
+
var e = (n.tokenize || d)(r, n);
|
|
70
|
+
return e == "comment" || e == "meta", e;
|
|
71
|
+
},
|
|
72
|
+
languageData: {
|
|
73
|
+
indentOnInput: /^\s*[{}]$/,
|
|
74
|
+
commentTokens: { block: { open: "(*", close: "*)" } }
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
export {
|
|
78
|
+
k as pascal
|
|
79
|
+
};
|