@tuoyuan/code-editor 1.0.0
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/README.md +505 -0
- package/dist/CodeEditor.vue.d.ts +335 -0
- package/dist/abap-Ck4GwL0j.js +1404 -0
- package/dist/abap-Dm-grL-k.cjs +6 -0
- package/dist/apex-BcgYgERc.cjs +6 -0
- package/dist/apex-ODA7HKAJ.js +332 -0
- package/dist/azcli-CTIyen0u.cjs +6 -0
- package/dist/azcli-Cb6cb8s9.js +74 -0
- package/dist/bat-DNcko697.cjs +6 -0
- package/dist/bat-DTzY2NZq.js +106 -0
- package/dist/bicep-BMFU7f1t.js +108 -0
- package/dist/bicep-CaTas9h4.cjs +7 -0
- package/dist/cameligo-CI3fenw2.cjs +6 -0
- package/dist/cameligo-NLSSnjLV.js +180 -0
- package/dist/clojure-BGGaGC_c.cjs +6 -0
- package/dist/clojure-Du0upEOV.js +767 -0
- package/dist/coffee-ClJtyy1o.cjs +6 -0
- package/dist/coffee-v4uQlkM7.js +238 -0
- package/dist/cpp-C8lRvf76.cjs +6 -0
- package/dist/cpp-D8cWT5D_.js +395 -0
- package/dist/csharp-Czug7i7m.js +332 -0
- package/dist/csharp-DWhydAB-.cjs +6 -0
- package/dist/csp-BWvo8sOh.cjs +6 -0
- package/dist/csp-C8fx6eO8.js +59 -0
- package/dist/css-BpNIi06k.js +193 -0
- package/dist/css-CFi1nolN.cjs +8 -0
- package/dist/cssMode-BfZeZ0sl.js +1577 -0
- package/dist/cssMode-CroponXs.cjs +9 -0
- package/dist/cypher-C17znEzs.js +269 -0
- package/dist/cypher-CeoUqDHe.cjs +6 -0
- package/dist/dart-BmDOWGHn.cjs +6 -0
- package/dist/dart-CYyrqmCr.js +287 -0
- package/dist/dockerfile-BQUsBUh7.js +136 -0
- package/dist/dockerfile-CughGaD6.cjs +6 -0
- package/dist/ecl-BDDxLC55.cjs +6 -0
- package/dist/ecl-CJB68izO.js +462 -0
- package/dist/elixir-BPaYnkX2.cjs +6 -0
- package/dist/elixir-DljgmHqx.js +575 -0
- package/dist/flow9-0BfLJTIY.js +148 -0
- package/dist/flow9-BYsSavfX.cjs +6 -0
- package/dist/formatter.d.ts +16 -0
- package/dist/freemarker2-CpMdvAfd.cjs +8 -0
- package/dist/freemarker2-DVRVJu0B.js +995 -0
- package/dist/fsharp-SmZEcjiu.cjs +6 -0
- package/dist/fsharp-lmsaS1LJ.js +223 -0
- package/dist/go-Tv83ayL9.js +224 -0
- package/dist/go-xVW5xrOi.cjs +6 -0
- package/dist/graphql-BH1G4Uv8.js +157 -0
- package/dist/graphql-BaJ0LkdR.cjs +6 -0
- package/dist/handlebars-8AMUT0_r.cjs +6 -0
- package/dist/handlebars-cspegSxe.js +425 -0
- package/dist/hcl-9tXVo0Oo.js +189 -0
- package/dist/hcl-BTIq68i_.cjs +6 -0
- package/dist/html-Bvlf1Z20.cjs +6 -0
- package/dist/html-zabMn0fr.js +314 -0
- package/dist/htmlMode-B3y58LIC.cjs +9 -0
- package/dist/htmlMode-jXZ-OnTX.js +1587 -0
- package/dist/index-BvnET_j2.js +132407 -0
- package/dist/index-CjGIE44E.cjs +1197 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1 -0
- package/dist/index.mjs +5 -0
- package/dist/ini-CJdCU2Im.cjs +6 -0
- package/dist/ini-DZX3aW6M.js +77 -0
- package/dist/java-Day25zBa.cjs +6 -0
- package/dist/java-Q9NjwWso.js +238 -0
- package/dist/javascript-BF91TgD3.js +76 -0
- package/dist/javascript-QgWqIxzo.cjs +6 -0
- package/dist/jsonMode-Chpjh-RM.cjs +15 -0
- package/dist/jsonMode-DD3uMliY.js +2002 -0
- package/dist/julia-BqwBsF5P.cjs +6 -0
- package/dist/julia-QQBeypPo.js +517 -0
- package/dist/kotlin-2AnhId0p.js +259 -0
- package/dist/kotlin-B4u9iQDL.cjs +6 -0
- package/dist/less-CWxTTuX7.cjs +7 -0
- package/dist/less-Daawp9Qu.js +168 -0
- package/dist/lexon-B1xVKv1m.cjs +6 -0
- package/dist/lexon-CqxA-4g1.js +163 -0
- package/dist/liquid-CsQKIvsE.cjs +6 -0
- package/dist/liquid-DxypC1q6.js +246 -0
- package/dist/lua-C9DR8JqQ.js +168 -0
- package/dist/lua-GQ1AlIpR.cjs +6 -0
- package/dist/m3-ChnU6a_2.cjs +6 -0
- package/dist/m3-ChoO2Aeo.js +216 -0
- package/dist/markdown-vGe7N__p.js +235 -0
- package/dist/markdown-yRKnCzup.cjs +6 -0
- package/dist/mdx-BvsKvd6j.cjs +6 -0
- package/dist/mdx-DZRrNJcb.js +171 -0
- package/dist/mips-B35Tctk9.js +204 -0
- package/dist/mips-DE1-KCxg.cjs +6 -0
- package/dist/monaco-worker.d.ts +2 -0
- package/dist/msdax-CKduWRE-.js +381 -0
- package/dist/msdax-D0cml5wZ.cjs +6 -0
- package/dist/mysql-D4V3ltpC.js +884 -0
- package/dist/mysql-DLWkbGoZ.cjs +6 -0
- package/dist/objective-c-CaS419yz.js +189 -0
- package/dist/objective-c-aq90HTjV.cjs +6 -0
- package/dist/pascal-CzzqMa-q.js +257 -0
- package/dist/pascal-Tx_vZ5dG.cjs +6 -0
- package/dist/pascaligo-DPbJfhBm.js +170 -0
- package/dist/pascaligo-D_Ri2CTv.cjs +6 -0
- package/dist/perl-CswrnJgZ.cjs +6 -0
- package/dist/perl-DiakDHGa.js +632 -0
- package/dist/pgsql-CCS271_e.cjs +6 -0
- package/dist/pgsql-FgzHGfbe.js +857 -0
- package/dist/php-BtenrrrR.cjs +6 -0
- package/dist/php-DeEgUIDo.js +506 -0
- package/dist/pla-BtA__bSx.js +143 -0
- package/dist/pla-DqtRVxAK.cjs +6 -0
- package/dist/postiats-CDpKZOjz.js +913 -0
- package/dist/postiats-CMjeSPtv.cjs +6 -0
- package/dist/powerquery-C4wMFtve.js +896 -0
- package/dist/powerquery-DMrlf6nl.cjs +6 -0
- package/dist/powershell-BIXcUAIq.js +245 -0
- package/dist/powershell-BzvWvXBW.cjs +6 -0
- package/dist/protobuf-BHrBiKx5.js +426 -0
- package/dist/protobuf-BkfVMs3q.cjs +7 -0
- package/dist/pug-BgHHt25K.cjs +6 -0
- package/dist/pug-D_c6Bxex.js +408 -0
- package/dist/python-CDI0D2Kf.cjs +6 -0
- package/dist/python-CXOcTmBp.js +307 -0
- package/dist/qsharp-BS_wm4zq.cjs +6 -0
- package/dist/qsharp-Bmp6Uoth.js +291 -0
- package/dist/r-Cw-pZRR6.js +249 -0
- package/dist/r-XsO4bdi0.cjs +6 -0
- package/dist/razor-CAIWGDkN.cjs +6 -0
- package/dist/razor-Do5Lpn1p.js +556 -0
- package/dist/redis-D5elYsZS.cjs +6 -0
- package/dist/redis-DSkWtKTU.js +308 -0
- package/dist/redshift-BrAReR9w.cjs +6 -0
- package/dist/redshift-G3V-UH7H.js +815 -0
- package/dist/restructuredtext-C3HS0Vuf.js +180 -0
- package/dist/restructuredtext-CzNfc37y.cjs +6 -0
- package/dist/ruby-CFRrX6F7.cjs +6 -0
- package/dist/ruby-DdxOY_t-.js +517 -0
- package/dist/rust-BgYTY-pT.cjs +6 -0
- package/dist/rust-CHLNe-uh.js +349 -0
- package/dist/sb-DjdwHjNi.cjs +6 -0
- package/dist/sb-VgZvRVjv.js +121 -0
- package/dist/scala-BEo281v6.js +376 -0
- package/dist/scala-C9e5dt2E.cjs +6 -0
- package/dist/scheme-BPzKEKRg.cjs +6 -0
- package/dist/scheme-BwtlTEx9.js +114 -0
- package/dist/scss-B_KRI23k.cjs +8 -0
- package/dist/scss-DNHJcE5b.js +268 -0
- package/dist/shell-961u9U9E.cjs +6 -0
- package/dist/shell-CYXbUHt6.js +227 -0
- package/dist/solidity-B94td9D0.js +1373 -0
- package/dist/solidity-DyAQZQb-.cjs +6 -0
- package/dist/sophia-C67C1dNJ.cjs +6 -0
- package/dist/sophia-CgOMMImk.js +205 -0
- package/dist/sparql-CmRbqkGW.js +207 -0
- package/dist/sparql-DTHixtMm.cjs +6 -0
- package/dist/sql-CX8rIh5F.cjs +6 -0
- package/dist/sql-DVsVTphc.js +859 -0
- package/dist/st-ATFa4Vu3.js +422 -0
- package/dist/st-CBQkFfzG.cjs +6 -0
- package/dist/style.css +1 -0
- package/dist/swift-K4rp2L0u.js +318 -0
- package/dist/swift-XvmCMD7s.cjs +8 -0
- package/dist/systemverilog-D0lDJRC5.cjs +6 -0
- package/dist/systemverilog-YgLuECrg.js +582 -0
- package/dist/tcl-BHcJGOmo.js +238 -0
- package/dist/tcl-Ju0vlxf3.cjs +6 -0
- package/dist/tsMode-D7bHvHeH.cjs +16 -0
- package/dist/tsMode-DiYbk3vf.js +895 -0
- package/dist/twig-B1JhL8Uy.cjs +6 -0
- package/dist/twig-sVb_x968.js +398 -0
- package/dist/types.d.ts +16 -0
- package/dist/typescript-CI6w3N2S.cjs +6 -0
- package/dist/typescript-DFdjl8Xj.js +349 -0
- package/dist/typespec-BSdcQAUL.js +123 -0
- package/dist/typespec-u6UGyzVa.cjs +6 -0
- package/dist/vb-BZywMj6s.js +378 -0
- package/dist/vb-CB1voSvV.cjs +6 -0
- package/dist/wgsl-eG2bS915.js +445 -0
- package/dist/wgsl-eXQZam6Q.cjs +303 -0
- package/dist/xml-CJndgX4z.js +101 -0
- package/dist/xml-CO5xAOVk.cjs +6 -0
- package/dist/yaml--krIkoJ8.js +212 -0
- package/dist/yaml-BYk2IWKs.cjs +6 -0
- package/package.json +73 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/*!-----------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
4
|
+
* Released under the MIT license
|
|
5
|
+
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
6
|
+
*-----------------------------------------------------------------------------*/var e={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:"(",close:")",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],folding:{markers:{start:new RegExp("^\\s*(#|//)region\\b"),end:new RegExp("^\\s*(#|//)endregion\\b")}}},t={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.root"}],[/<!DOCTYPE/,"metatag.html","@doctype"],[/<!--/,"comment.html","@comment"],[/(<)(\w+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/</,"delimiter.html"],[/[^<]+/]],doctype:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.comment"}],[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],phpInSimpleState:[[/<\?((php)|=)?/,"metatag.php"],[/\?>/,{token:"metatag.php",switchTo:"@$S2.$S3"}],{include:"phpRoot"}],phpInEmbeddedState:[[/<\?((php)|=)?/,"metatag.php"],[/\?>/,{token:"metatag.php",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"phpRoot"}],phpRoot:[[/[a-zA-Z_]\w*/,{cases:{"@phpKeywords":{token:"keyword.php"},"@phpCompileTimeConstants":{token:"constant.php"},"@default":"identifier.php"}}],[/[$a-zA-Z_]\w*/,{cases:{"@phpPreDefinedVariables":{token:"variable.predefined.php"},"@default":"variable.php"}}],[/[{}]/,"delimiter.bracket.php"],[/[\[\]]/,"delimiter.array.php"],[/[()]/,"delimiter.parenthesis.php"],[/[ \t\r\n]+/],[/(#|\/\/)$/,"comment.php"],[/(#|\/\/)/,"comment.php","@phpLineComment"],[/\/\*/,"comment.php","@phpComment"],[/"/,"string.php","@phpDoubleQuoteString"],[/'/,"string.php","@phpSingleQuoteString"],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,\@]/,"delimiter.php"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.php"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.php"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.php"],[/0[0-7']*[0-7]/,"number.octal.php"],[/0[bB][0-1']*[0-1]/,"number.binary.php"],[/\d[\d']*/,"number.php"],[/\d/,"number.php"]],phpComment:[[/\*\//,"comment.php","@pop"],[/[^*]+/,"comment.php"],[/./,"comment.php"]],phpLineComment:[[/\?>/,{token:"@rematch",next:"@pop"}],[/.$/,"comment.php","@pop"],[/[^?]+$/,"comment.php","@pop"],[/[^?]+/,"comment.php"],[/./,"comment.php"]],phpDoubleQuoteString:[[/[^\\"]+/,"string.php"],[/@escapes/,"string.escape.php"],[/\\./,"string.escape.invalid.php"],[/"/,"string.php","@pop"]],phpSingleQuoteString:[[/[^\\']+/,"string.php"],[/@escapes/,"string.escape.php"],[/\\./,"string.escape.invalid.php"],[/'/,"string.php","@pop"]]},phpKeywords:["abstract","and","array","as","break","callable","case","catch","cfunction","class","clone","const","continue","declare","default","do","else","elseif","enddeclare","endfor","endforeach","endif","endswitch","endwhile","extends","false","final","for","foreach","function","global","goto","if","implements","interface","instanceof","insteadof","namespace","new","null","object","old_function","or","private","protected","public","resource","static","switch","throw","trait","try","true","use","var","while","xor","die","echo","empty","exit","eval","include","include_once","isset","list","require","require_once","return","print","unset","yield","__construct"],phpCompileTimeConstants:["__CLASS__","__DIR__","__FILE__","__LINE__","__NAMESPACE__","__METHOD__","__FUNCTION__","__TRAIT__"],phpPreDefinedVariables:["$GLOBALS","$_SERVER","$_GET","$_POST","$_FILES","$_REQUEST","$_SESSION","$_ENV","$_COOKIE","$php_errormsg","$HTTP_RAW_POST_DATA","$http_response_header","$argc","$argv"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/};exports.conf=e;exports.language=t;
|
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
/*!-----------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
4
|
+
* Released under the MIT license
|
|
5
|
+
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
6
|
+
*-----------------------------------------------------------------------------*/
|
|
7
|
+
var e = {
|
|
8
|
+
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
|
9
|
+
comments: {
|
|
10
|
+
lineComment: "//",
|
|
11
|
+
blockComment: ["/*", "*/"]
|
|
12
|
+
},
|
|
13
|
+
brackets: [
|
|
14
|
+
["{", "}"],
|
|
15
|
+
["[", "]"],
|
|
16
|
+
["(", ")"]
|
|
17
|
+
],
|
|
18
|
+
autoClosingPairs: [
|
|
19
|
+
{ open: "{", close: "}", notIn: ["string"] },
|
|
20
|
+
{ open: "[", close: "]", notIn: ["string"] },
|
|
21
|
+
{ open: "(", close: ")", notIn: ["string"] },
|
|
22
|
+
{ open: '"', close: '"', notIn: ["string"] },
|
|
23
|
+
{ open: "'", close: "'", notIn: ["string", "comment"] }
|
|
24
|
+
],
|
|
25
|
+
folding: {
|
|
26
|
+
markers: {
|
|
27
|
+
start: new RegExp("^\\s*(#|//)region\\b"),
|
|
28
|
+
end: new RegExp("^\\s*(#|//)endregion\\b")
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}, t = {
|
|
32
|
+
defaultToken: "",
|
|
33
|
+
tokenPostfix: "",
|
|
34
|
+
// ignoreCase: true,
|
|
35
|
+
// The main tokenizer for our languages
|
|
36
|
+
tokenizer: {
|
|
37
|
+
root: [
|
|
38
|
+
[/<\?((php)|=)?/, { token: "@rematch", switchTo: "@phpInSimpleState.root" }],
|
|
39
|
+
[/<!DOCTYPE/, "metatag.html", "@doctype"],
|
|
40
|
+
[/<!--/, "comment.html", "@comment"],
|
|
41
|
+
[/(<)(\w+)(\/>)/, ["delimiter.html", "tag.html", "delimiter.html"]],
|
|
42
|
+
[/(<)(script)/, ["delimiter.html", { token: "tag.html", next: "@script" }]],
|
|
43
|
+
[/(<)(style)/, ["delimiter.html", { token: "tag.html", next: "@style" }]],
|
|
44
|
+
[/(<)([:\w]+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
|
|
45
|
+
[/(<\/)(\w+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
|
|
46
|
+
[/</, "delimiter.html"],
|
|
47
|
+
[/[^<]+/]
|
|
48
|
+
// text
|
|
49
|
+
],
|
|
50
|
+
doctype: [
|
|
51
|
+
[/<\?((php)|=)?/, { token: "@rematch", switchTo: "@phpInSimpleState.comment" }],
|
|
52
|
+
[/[^>]+/, "metatag.content.html"],
|
|
53
|
+
[/>/, "metatag.html", "@pop"]
|
|
54
|
+
],
|
|
55
|
+
comment: [
|
|
56
|
+
[/<\?((php)|=)?/, { token: "@rematch", switchTo: "@phpInSimpleState.comment" }],
|
|
57
|
+
[/-->/, "comment.html", "@pop"],
|
|
58
|
+
[/[^-]+/, "comment.content.html"],
|
|
59
|
+
[/./, "comment.content.html"]
|
|
60
|
+
],
|
|
61
|
+
otherTag: [
|
|
62
|
+
[/<\?((php)|=)?/, { token: "@rematch", switchTo: "@phpInSimpleState.otherTag" }],
|
|
63
|
+
[/\/?>/, "delimiter.html", "@pop"],
|
|
64
|
+
[/"([^"]*)"/, "attribute.value"],
|
|
65
|
+
[/'([^']*)'/, "attribute.value"],
|
|
66
|
+
[/[\w\-]+/, "attribute.name"],
|
|
67
|
+
[/=/, "delimiter"],
|
|
68
|
+
[/[ \t\r\n]+/]
|
|
69
|
+
// whitespace
|
|
70
|
+
],
|
|
71
|
+
// -- BEGIN <script> tags handling
|
|
72
|
+
// After <script
|
|
73
|
+
script: [
|
|
74
|
+
[/<\?((php)|=)?/, { token: "@rematch", switchTo: "@phpInSimpleState.script" }],
|
|
75
|
+
[/type/, "attribute.name", "@scriptAfterType"],
|
|
76
|
+
[/"([^"]*)"/, "attribute.value"],
|
|
77
|
+
[/'([^']*)'/, "attribute.value"],
|
|
78
|
+
[/[\w\-]+/, "attribute.name"],
|
|
79
|
+
[/=/, "delimiter"],
|
|
80
|
+
[
|
|
81
|
+
/>/,
|
|
82
|
+
{
|
|
83
|
+
token: "delimiter.html",
|
|
84
|
+
next: "@scriptEmbedded.text/javascript",
|
|
85
|
+
nextEmbedded: "text/javascript"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
[/[ \t\r\n]+/],
|
|
89
|
+
// whitespace
|
|
90
|
+
[
|
|
91
|
+
/(<\/)(script\s*)(>)/,
|
|
92
|
+
["delimiter.html", "tag.html", { token: "delimiter.html", next: "@pop" }]
|
|
93
|
+
]
|
|
94
|
+
],
|
|
95
|
+
// After <script ... type
|
|
96
|
+
scriptAfterType: [
|
|
97
|
+
[
|
|
98
|
+
/<\?((php)|=)?/,
|
|
99
|
+
{
|
|
100
|
+
token: "@rematch",
|
|
101
|
+
switchTo: "@phpInSimpleState.scriptAfterType"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
[/=/, "delimiter", "@scriptAfterTypeEquals"],
|
|
105
|
+
[
|
|
106
|
+
/>/,
|
|
107
|
+
{
|
|
108
|
+
token: "delimiter.html",
|
|
109
|
+
next: "@scriptEmbedded.text/javascript",
|
|
110
|
+
nextEmbedded: "text/javascript"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
// cover invalid e.g. <script type>
|
|
114
|
+
[/[ \t\r\n]+/],
|
|
115
|
+
// whitespace
|
|
116
|
+
[/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
|
|
117
|
+
],
|
|
118
|
+
// After <script ... type =
|
|
119
|
+
scriptAfterTypeEquals: [
|
|
120
|
+
[
|
|
121
|
+
/<\?((php)|=)?/,
|
|
122
|
+
{
|
|
123
|
+
token: "@rematch",
|
|
124
|
+
switchTo: "@phpInSimpleState.scriptAfterTypeEquals"
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
[
|
|
128
|
+
/"([^"]*)"/,
|
|
129
|
+
{
|
|
130
|
+
token: "attribute.value",
|
|
131
|
+
switchTo: "@scriptWithCustomType.$1"
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
[
|
|
135
|
+
/'([^']*)'/,
|
|
136
|
+
{
|
|
137
|
+
token: "attribute.value",
|
|
138
|
+
switchTo: "@scriptWithCustomType.$1"
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
[
|
|
142
|
+
/>/,
|
|
143
|
+
{
|
|
144
|
+
token: "delimiter.html",
|
|
145
|
+
next: "@scriptEmbedded.text/javascript",
|
|
146
|
+
nextEmbedded: "text/javascript"
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
// cover invalid e.g. <script type=>
|
|
150
|
+
[/[ \t\r\n]+/],
|
|
151
|
+
// whitespace
|
|
152
|
+
[/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
|
|
153
|
+
],
|
|
154
|
+
// After <script ... type = $S2
|
|
155
|
+
scriptWithCustomType: [
|
|
156
|
+
[
|
|
157
|
+
/<\?((php)|=)?/,
|
|
158
|
+
{
|
|
159
|
+
token: "@rematch",
|
|
160
|
+
switchTo: "@phpInSimpleState.scriptWithCustomType.$S2"
|
|
161
|
+
}
|
|
162
|
+
],
|
|
163
|
+
[
|
|
164
|
+
/>/,
|
|
165
|
+
{
|
|
166
|
+
token: "delimiter.html",
|
|
167
|
+
next: "@scriptEmbedded.$S2",
|
|
168
|
+
nextEmbedded: "$S2"
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
[/"([^"]*)"/, "attribute.value"],
|
|
172
|
+
[/'([^']*)'/, "attribute.value"],
|
|
173
|
+
[/[\w\-]+/, "attribute.name"],
|
|
174
|
+
[/=/, "delimiter"],
|
|
175
|
+
[/[ \t\r\n]+/],
|
|
176
|
+
// whitespace
|
|
177
|
+
[/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
|
|
178
|
+
],
|
|
179
|
+
scriptEmbedded: [
|
|
180
|
+
[
|
|
181
|
+
/<\?((php)|=)?/,
|
|
182
|
+
{
|
|
183
|
+
token: "@rematch",
|
|
184
|
+
switchTo: "@phpInEmbeddedState.scriptEmbedded.$S2",
|
|
185
|
+
nextEmbedded: "@pop"
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
[/<\/script/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }]
|
|
189
|
+
],
|
|
190
|
+
// -- END <script> tags handling
|
|
191
|
+
// -- BEGIN <style> tags handling
|
|
192
|
+
// After <style
|
|
193
|
+
style: [
|
|
194
|
+
[/<\?((php)|=)?/, { token: "@rematch", switchTo: "@phpInSimpleState.style" }],
|
|
195
|
+
[/type/, "attribute.name", "@styleAfterType"],
|
|
196
|
+
[/"([^"]*)"/, "attribute.value"],
|
|
197
|
+
[/'([^']*)'/, "attribute.value"],
|
|
198
|
+
[/[\w\-]+/, "attribute.name"],
|
|
199
|
+
[/=/, "delimiter"],
|
|
200
|
+
[
|
|
201
|
+
/>/,
|
|
202
|
+
{
|
|
203
|
+
token: "delimiter.html",
|
|
204
|
+
next: "@styleEmbedded.text/css",
|
|
205
|
+
nextEmbedded: "text/css"
|
|
206
|
+
}
|
|
207
|
+
],
|
|
208
|
+
[/[ \t\r\n]+/],
|
|
209
|
+
// whitespace
|
|
210
|
+
[
|
|
211
|
+
/(<\/)(style\s*)(>)/,
|
|
212
|
+
["delimiter.html", "tag.html", { token: "delimiter.html", next: "@pop" }]
|
|
213
|
+
]
|
|
214
|
+
],
|
|
215
|
+
// After <style ... type
|
|
216
|
+
styleAfterType: [
|
|
217
|
+
[
|
|
218
|
+
/<\?((php)|=)?/,
|
|
219
|
+
{
|
|
220
|
+
token: "@rematch",
|
|
221
|
+
switchTo: "@phpInSimpleState.styleAfterType"
|
|
222
|
+
}
|
|
223
|
+
],
|
|
224
|
+
[/=/, "delimiter", "@styleAfterTypeEquals"],
|
|
225
|
+
[
|
|
226
|
+
/>/,
|
|
227
|
+
{
|
|
228
|
+
token: "delimiter.html",
|
|
229
|
+
next: "@styleEmbedded.text/css",
|
|
230
|
+
nextEmbedded: "text/css"
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
// cover invalid e.g. <style type>
|
|
234
|
+
[/[ \t\r\n]+/],
|
|
235
|
+
// whitespace
|
|
236
|
+
[/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
|
|
237
|
+
],
|
|
238
|
+
// After <style ... type =
|
|
239
|
+
styleAfterTypeEquals: [
|
|
240
|
+
[
|
|
241
|
+
/<\?((php)|=)?/,
|
|
242
|
+
{
|
|
243
|
+
token: "@rematch",
|
|
244
|
+
switchTo: "@phpInSimpleState.styleAfterTypeEquals"
|
|
245
|
+
}
|
|
246
|
+
],
|
|
247
|
+
[
|
|
248
|
+
/"([^"]*)"/,
|
|
249
|
+
{
|
|
250
|
+
token: "attribute.value",
|
|
251
|
+
switchTo: "@styleWithCustomType.$1"
|
|
252
|
+
}
|
|
253
|
+
],
|
|
254
|
+
[
|
|
255
|
+
/'([^']*)'/,
|
|
256
|
+
{
|
|
257
|
+
token: "attribute.value",
|
|
258
|
+
switchTo: "@styleWithCustomType.$1"
|
|
259
|
+
}
|
|
260
|
+
],
|
|
261
|
+
[
|
|
262
|
+
/>/,
|
|
263
|
+
{
|
|
264
|
+
token: "delimiter.html",
|
|
265
|
+
next: "@styleEmbedded.text/css",
|
|
266
|
+
nextEmbedded: "text/css"
|
|
267
|
+
}
|
|
268
|
+
],
|
|
269
|
+
// cover invalid e.g. <style type=>
|
|
270
|
+
[/[ \t\r\n]+/],
|
|
271
|
+
// whitespace
|
|
272
|
+
[/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
|
|
273
|
+
],
|
|
274
|
+
// After <style ... type = $S2
|
|
275
|
+
styleWithCustomType: [
|
|
276
|
+
[
|
|
277
|
+
/<\?((php)|=)?/,
|
|
278
|
+
{
|
|
279
|
+
token: "@rematch",
|
|
280
|
+
switchTo: "@phpInSimpleState.styleWithCustomType.$S2"
|
|
281
|
+
}
|
|
282
|
+
],
|
|
283
|
+
[
|
|
284
|
+
/>/,
|
|
285
|
+
{
|
|
286
|
+
token: "delimiter.html",
|
|
287
|
+
next: "@styleEmbedded.$S2",
|
|
288
|
+
nextEmbedded: "$S2"
|
|
289
|
+
}
|
|
290
|
+
],
|
|
291
|
+
[/"([^"]*)"/, "attribute.value"],
|
|
292
|
+
[/'([^']*)'/, "attribute.value"],
|
|
293
|
+
[/[\w\-]+/, "attribute.name"],
|
|
294
|
+
[/=/, "delimiter"],
|
|
295
|
+
[/[ \t\r\n]+/],
|
|
296
|
+
// whitespace
|
|
297
|
+
[/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
|
|
298
|
+
],
|
|
299
|
+
styleEmbedded: [
|
|
300
|
+
[
|
|
301
|
+
/<\?((php)|=)?/,
|
|
302
|
+
{
|
|
303
|
+
token: "@rematch",
|
|
304
|
+
switchTo: "@phpInEmbeddedState.styleEmbedded.$S2",
|
|
305
|
+
nextEmbedded: "@pop"
|
|
306
|
+
}
|
|
307
|
+
],
|
|
308
|
+
[/<\/style/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }]
|
|
309
|
+
],
|
|
310
|
+
// -- END <style> tags handling
|
|
311
|
+
phpInSimpleState: [
|
|
312
|
+
[/<\?((php)|=)?/, "metatag.php"],
|
|
313
|
+
[/\?>/, { token: "metatag.php", switchTo: "@$S2.$S3" }],
|
|
314
|
+
{ include: "phpRoot" }
|
|
315
|
+
],
|
|
316
|
+
phpInEmbeddedState: [
|
|
317
|
+
[/<\?((php)|=)?/, "metatag.php"],
|
|
318
|
+
[
|
|
319
|
+
/\?>/,
|
|
320
|
+
{
|
|
321
|
+
token: "metatag.php",
|
|
322
|
+
switchTo: "@$S2.$S3",
|
|
323
|
+
nextEmbedded: "$S3"
|
|
324
|
+
}
|
|
325
|
+
],
|
|
326
|
+
{ include: "phpRoot" }
|
|
327
|
+
],
|
|
328
|
+
phpRoot: [
|
|
329
|
+
[
|
|
330
|
+
/[a-zA-Z_]\w*/,
|
|
331
|
+
{
|
|
332
|
+
cases: {
|
|
333
|
+
"@phpKeywords": { token: "keyword.php" },
|
|
334
|
+
"@phpCompileTimeConstants": { token: "constant.php" },
|
|
335
|
+
"@default": "identifier.php"
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
],
|
|
339
|
+
[
|
|
340
|
+
/[$a-zA-Z_]\w*/,
|
|
341
|
+
{
|
|
342
|
+
cases: {
|
|
343
|
+
"@phpPreDefinedVariables": {
|
|
344
|
+
token: "variable.predefined.php"
|
|
345
|
+
},
|
|
346
|
+
"@default": "variable.php"
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
],
|
|
350
|
+
// brackets
|
|
351
|
+
[/[{}]/, "delimiter.bracket.php"],
|
|
352
|
+
[/[\[\]]/, "delimiter.array.php"],
|
|
353
|
+
[/[()]/, "delimiter.parenthesis.php"],
|
|
354
|
+
// whitespace
|
|
355
|
+
[/[ \t\r\n]+/],
|
|
356
|
+
// comments
|
|
357
|
+
[/(#|\/\/)$/, "comment.php"],
|
|
358
|
+
[/(#|\/\/)/, "comment.php", "@phpLineComment"],
|
|
359
|
+
// block comments
|
|
360
|
+
[/\/\*/, "comment.php", "@phpComment"],
|
|
361
|
+
// strings
|
|
362
|
+
[/"/, "string.php", "@phpDoubleQuoteString"],
|
|
363
|
+
[/'/, "string.php", "@phpSingleQuoteString"],
|
|
364
|
+
// delimiters
|
|
365
|
+
[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,\@]/, "delimiter.php"],
|
|
366
|
+
// numbers
|
|
367
|
+
[/\d*\d+[eE]([\-+]?\d+)?/, "number.float.php"],
|
|
368
|
+
[/\d*\.\d+([eE][\-+]?\d+)?/, "number.float.php"],
|
|
369
|
+
[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/, "number.hex.php"],
|
|
370
|
+
[/0[0-7']*[0-7]/, "number.octal.php"],
|
|
371
|
+
[/0[bB][0-1']*[0-1]/, "number.binary.php"],
|
|
372
|
+
[/\d[\d']*/, "number.php"],
|
|
373
|
+
[/\d/, "number.php"]
|
|
374
|
+
],
|
|
375
|
+
phpComment: [
|
|
376
|
+
[/\*\//, "comment.php", "@pop"],
|
|
377
|
+
[/[^*]+/, "comment.php"],
|
|
378
|
+
[/./, "comment.php"]
|
|
379
|
+
],
|
|
380
|
+
phpLineComment: [
|
|
381
|
+
[/\?>/, { token: "@rematch", next: "@pop" }],
|
|
382
|
+
[/.$/, "comment.php", "@pop"],
|
|
383
|
+
[/[^?]+$/, "comment.php", "@pop"],
|
|
384
|
+
[/[^?]+/, "comment.php"],
|
|
385
|
+
[/./, "comment.php"]
|
|
386
|
+
],
|
|
387
|
+
phpDoubleQuoteString: [
|
|
388
|
+
[/[^\\"]+/, "string.php"],
|
|
389
|
+
[/@escapes/, "string.escape.php"],
|
|
390
|
+
[/\\./, "string.escape.invalid.php"],
|
|
391
|
+
[/"/, "string.php", "@pop"]
|
|
392
|
+
],
|
|
393
|
+
phpSingleQuoteString: [
|
|
394
|
+
[/[^\\']+/, "string.php"],
|
|
395
|
+
[/@escapes/, "string.escape.php"],
|
|
396
|
+
[/\\./, "string.escape.invalid.php"],
|
|
397
|
+
[/'/, "string.php", "@pop"]
|
|
398
|
+
]
|
|
399
|
+
},
|
|
400
|
+
phpKeywords: [
|
|
401
|
+
"abstract",
|
|
402
|
+
"and",
|
|
403
|
+
"array",
|
|
404
|
+
"as",
|
|
405
|
+
"break",
|
|
406
|
+
"callable",
|
|
407
|
+
"case",
|
|
408
|
+
"catch",
|
|
409
|
+
"cfunction",
|
|
410
|
+
"class",
|
|
411
|
+
"clone",
|
|
412
|
+
"const",
|
|
413
|
+
"continue",
|
|
414
|
+
"declare",
|
|
415
|
+
"default",
|
|
416
|
+
"do",
|
|
417
|
+
"else",
|
|
418
|
+
"elseif",
|
|
419
|
+
"enddeclare",
|
|
420
|
+
"endfor",
|
|
421
|
+
"endforeach",
|
|
422
|
+
"endif",
|
|
423
|
+
"endswitch",
|
|
424
|
+
"endwhile",
|
|
425
|
+
"extends",
|
|
426
|
+
"false",
|
|
427
|
+
"final",
|
|
428
|
+
"for",
|
|
429
|
+
"foreach",
|
|
430
|
+
"function",
|
|
431
|
+
"global",
|
|
432
|
+
"goto",
|
|
433
|
+
"if",
|
|
434
|
+
"implements",
|
|
435
|
+
"interface",
|
|
436
|
+
"instanceof",
|
|
437
|
+
"insteadof",
|
|
438
|
+
"namespace",
|
|
439
|
+
"new",
|
|
440
|
+
"null",
|
|
441
|
+
"object",
|
|
442
|
+
"old_function",
|
|
443
|
+
"or",
|
|
444
|
+
"private",
|
|
445
|
+
"protected",
|
|
446
|
+
"public",
|
|
447
|
+
"resource",
|
|
448
|
+
"static",
|
|
449
|
+
"switch",
|
|
450
|
+
"throw",
|
|
451
|
+
"trait",
|
|
452
|
+
"try",
|
|
453
|
+
"true",
|
|
454
|
+
"use",
|
|
455
|
+
"var",
|
|
456
|
+
"while",
|
|
457
|
+
"xor",
|
|
458
|
+
"die",
|
|
459
|
+
"echo",
|
|
460
|
+
"empty",
|
|
461
|
+
"exit",
|
|
462
|
+
"eval",
|
|
463
|
+
"include",
|
|
464
|
+
"include_once",
|
|
465
|
+
"isset",
|
|
466
|
+
"list",
|
|
467
|
+
"require",
|
|
468
|
+
"require_once",
|
|
469
|
+
"return",
|
|
470
|
+
"print",
|
|
471
|
+
"unset",
|
|
472
|
+
"yield",
|
|
473
|
+
"__construct"
|
|
474
|
+
],
|
|
475
|
+
phpCompileTimeConstants: [
|
|
476
|
+
"__CLASS__",
|
|
477
|
+
"__DIR__",
|
|
478
|
+
"__FILE__",
|
|
479
|
+
"__LINE__",
|
|
480
|
+
"__NAMESPACE__",
|
|
481
|
+
"__METHOD__",
|
|
482
|
+
"__FUNCTION__",
|
|
483
|
+
"__TRAIT__"
|
|
484
|
+
],
|
|
485
|
+
phpPreDefinedVariables: [
|
|
486
|
+
"$GLOBALS",
|
|
487
|
+
"$_SERVER",
|
|
488
|
+
"$_GET",
|
|
489
|
+
"$_POST",
|
|
490
|
+
"$_FILES",
|
|
491
|
+
"$_REQUEST",
|
|
492
|
+
"$_SESSION",
|
|
493
|
+
"$_ENV",
|
|
494
|
+
"$_COOKIE",
|
|
495
|
+
"$php_errormsg",
|
|
496
|
+
"$HTTP_RAW_POST_DATA",
|
|
497
|
+
"$http_response_header",
|
|
498
|
+
"$argc",
|
|
499
|
+
"$argv"
|
|
500
|
+
],
|
|
501
|
+
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/
|
|
502
|
+
};
|
|
503
|
+
export {
|
|
504
|
+
e as conf,
|
|
505
|
+
t as language
|
|
506
|
+
};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/*!-----------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
4
|
+
* Released under the MIT license
|
|
5
|
+
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
6
|
+
*-----------------------------------------------------------------------------*/
|
|
7
|
+
var e = {
|
|
8
|
+
comments: {
|
|
9
|
+
lineComment: "#"
|
|
10
|
+
},
|
|
11
|
+
brackets: [
|
|
12
|
+
["[", "]"],
|
|
13
|
+
["<", ">"],
|
|
14
|
+
["(", ")"]
|
|
15
|
+
],
|
|
16
|
+
autoClosingPairs: [
|
|
17
|
+
{ open: "[", close: "]" },
|
|
18
|
+
{ open: "<", close: ">" },
|
|
19
|
+
{ open: "(", close: ")" }
|
|
20
|
+
],
|
|
21
|
+
surroundingPairs: [
|
|
22
|
+
{ open: "[", close: "]" },
|
|
23
|
+
{ open: "<", close: ">" },
|
|
24
|
+
{ open: "(", close: ")" }
|
|
25
|
+
]
|
|
26
|
+
}, o = {
|
|
27
|
+
defaultToken: "",
|
|
28
|
+
tokenPostfix: ".pla",
|
|
29
|
+
brackets: [
|
|
30
|
+
{ open: "[", close: "]", token: "delimiter.square" },
|
|
31
|
+
{ open: "<", close: ">", token: "delimiter.angle" },
|
|
32
|
+
{ open: "(", close: ")", token: "delimiter.parenthesis" }
|
|
33
|
+
],
|
|
34
|
+
keywords: [
|
|
35
|
+
".i",
|
|
36
|
+
".o",
|
|
37
|
+
".mv",
|
|
38
|
+
".ilb",
|
|
39
|
+
".ob",
|
|
40
|
+
".label",
|
|
41
|
+
".type",
|
|
42
|
+
".phase",
|
|
43
|
+
".pair",
|
|
44
|
+
".symbolic",
|
|
45
|
+
".symbolic-output",
|
|
46
|
+
".kiss",
|
|
47
|
+
".p",
|
|
48
|
+
".e",
|
|
49
|
+
".end"
|
|
50
|
+
],
|
|
51
|
+
// regular expressions
|
|
52
|
+
comment: /#.*$/,
|
|
53
|
+
identifier: /[a-zA-Z]+[a-zA-Z0-9_\-]*/,
|
|
54
|
+
plaContent: /[01\-~\|]+/,
|
|
55
|
+
// The main tokenizer for our languages
|
|
56
|
+
tokenizer: {
|
|
57
|
+
root: [
|
|
58
|
+
// comments and whitespace
|
|
59
|
+
{ include: "@whitespace" },
|
|
60
|
+
[/@comment/, "comment"],
|
|
61
|
+
// keyword
|
|
62
|
+
[
|
|
63
|
+
/\.([a-zA-Z_\-]+)/,
|
|
64
|
+
{
|
|
65
|
+
cases: {
|
|
66
|
+
"@eos": { token: "keyword.$1" },
|
|
67
|
+
"@keywords": {
|
|
68
|
+
cases: {
|
|
69
|
+
".type": { token: "keyword.$1", next: "@type" },
|
|
70
|
+
"@default": { token: "keyword.$1", next: "@keywordArg" }
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"@default": { token: "keyword.$1" }
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
// identifiers
|
|
78
|
+
[/@identifier/, "identifier"],
|
|
79
|
+
// PLA row
|
|
80
|
+
[/@plaContent/, "string"]
|
|
81
|
+
],
|
|
82
|
+
whitespace: [[/[ \t\r\n]+/, ""]],
|
|
83
|
+
type: [{ include: "@whitespace" }, [/\w+/, { token: "type", next: "@pop" }]],
|
|
84
|
+
keywordArg: [
|
|
85
|
+
// whitespace
|
|
86
|
+
[
|
|
87
|
+
/[ \t\r\n]+/,
|
|
88
|
+
{
|
|
89
|
+
cases: {
|
|
90
|
+
"@eos": { token: "", next: "@pop" },
|
|
91
|
+
"@default": ""
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
// comments
|
|
96
|
+
[/@comment/, "comment", "@pop"],
|
|
97
|
+
// brackets
|
|
98
|
+
[
|
|
99
|
+
/[<>()\[\]]/,
|
|
100
|
+
{
|
|
101
|
+
cases: {
|
|
102
|
+
"@eos": { token: "@brackets", next: "@pop" },
|
|
103
|
+
"@default": "@brackets"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
// numbers
|
|
108
|
+
[
|
|
109
|
+
/\-?\d+/,
|
|
110
|
+
{
|
|
111
|
+
cases: {
|
|
112
|
+
"@eos": { token: "number", next: "@pop" },
|
|
113
|
+
"@default": "number"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
// identifiers
|
|
118
|
+
[
|
|
119
|
+
/@identifier/,
|
|
120
|
+
{
|
|
121
|
+
cases: {
|
|
122
|
+
"@eos": { token: "identifier", next: "@pop" },
|
|
123
|
+
"@default": "identifier"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
// delimiter
|
|
128
|
+
[
|
|
129
|
+
/[;=]/,
|
|
130
|
+
{
|
|
131
|
+
cases: {
|
|
132
|
+
"@eos": { token: "delimiter", next: "@pop" },
|
|
133
|
+
"@default": "delimiter"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
export {
|
|
141
|
+
e as conf,
|
|
142
|
+
o as language
|
|
143
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/*!-----------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
4
|
+
* Released under the MIT license
|
|
5
|
+
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
6
|
+
*-----------------------------------------------------------------------------*/var e={comments:{lineComment:"#"},brackets:[["[","]"],["<",">"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"<",close:">"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"<",close:">"},{open:"(",close:")"}]},o={defaultToken:"",tokenPostfix:".pla",brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"<",close:">",token:"delimiter.angle"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:[".i",".o",".mv",".ilb",".ob",".label",".type",".phase",".pair",".symbolic",".symbolic-output",".kiss",".p",".e",".end"],comment:/#.*$/,identifier:/[a-zA-Z]+[a-zA-Z0-9_\-]*/,plaContent:/[01\-~\|]+/,tokenizer:{root:[{include:"@whitespace"},[/@comment/,"comment"],[/\.([a-zA-Z_\-]+)/,{cases:{"@eos":{token:"keyword.$1"},"@keywords":{cases:{".type":{token:"keyword.$1",next:"@type"},"@default":{token:"keyword.$1",next:"@keywordArg"}}},"@default":{token:"keyword.$1"}}}],[/@identifier/,"identifier"],[/@plaContent/,"string"]],whitespace:[[/[ \t\r\n]+/,""]],type:[{include:"@whitespace"},[/\w+/,{token:"type",next:"@pop"}]],keywordArg:[[/[ \t\r\n]+/,{cases:{"@eos":{token:"",next:"@pop"},"@default":""}}],[/@comment/,"comment","@pop"],[/[<>()\[\]]/,{cases:{"@eos":{token:"@brackets",next:"@pop"},"@default":"@brackets"}}],[/\-?\d+/,{cases:{"@eos":{token:"number",next:"@pop"},"@default":"number"}}],[/@identifier/,{cases:{"@eos":{token:"identifier",next:"@pop"},"@default":"identifier"}}],[/[;=]/,{cases:{"@eos":{token:"delimiter",next:"@pop"},"@default":"delimiter"}}]]}};exports.conf=e;exports.language=o;
|