diff --git a/components.js b/components.js index 283aba774d..f21c7ef78d 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 29f56e959c..62caa50a31 100644 --- a/components.json +++ b/components.json @@ -477,6 +477,10 @@ "title": "Monkey", "owner": "Golmote" }, + "n1ql": { + "title": "N1QL", + "owner": "TMWilds" + }, "n4js": { "title": "N4JS", "require": "javascript", diff --git a/components/prism-n1ql.js b/components/prism-n1ql.js new file mode 100644 index 0000000000..59bb8e425b --- /dev/null +++ b/components/prism-n1ql.js @@ -0,0 +1,18 @@ +Prism.languages.n1ql = { + 'comment': /\/\*[\s\S]*?(?:$|\*\/)/, + 'parameter': /\$[\w.]+/, + 'string': { + pattern: /(["'])(?:\\[\s\S]|(?!\1)[^\\]|\1\1)*\1/, + greedy: true, + }, + 'identifier': { + pattern: /`(?:\\[\s\S]|[^\\`]|``)*`/, + greedy: true, + }, + 'function': /\b(?:ABS|ACOS|ARRAY_AGG|ARRAY_APPEND|ARRAY_AVG|ARRAY_CONCAT|ARRAY_CONTAINS|ARRAY_COUNT|ARRAY_DISTINCT|ARRAY_FLATTEN|ARRAY_IFNULL|ARRAY_INSERT|ARRAY_INTERSECT|ARRAY_LENGTH|ARRAY_MAX|ARRAY_MIN|ARRAY_POSITION|ARRAY_PREPEND|ARRAY_PUT|ARRAY_RANGE|ARRAY_REMOVE|ARRAY_REPEAT|ARRAY_REPLACE|ARRAY_REVERSE|ARRAY_SORT|ARRAY_STAR|ARRAY_SUM|ARRAY_SYMDIFF|ARRAY_SYMDIFFN|ARRAY_UNION|ASIN|ATAN|ATAN2|AVG|BASE64|BASE64_DECODE|BASE64_ENCODE|BITAND|BITCLEAR|BITNOT|BITOR|BITSET|BITSHIFT|BITTEST|BITXOR|CEIL|CLOCK_LOCAL|CLOCK_MILLIS|CLOCK_STR|CLOCK_TZ|CLOCK_UTC|CONTAINS|CONTAINS_TOKEN|CONTAINS_TOKEN_LIKE|CONTAINS_TOKEN_REGEXP|COS|COUNT|CURL|DATE_ADD_MILLIS|DATE_ADD_STR|DATE_DIFF_MILLIS|DATE_DIFF_STR|DATE_FORMAT_STR|DATE_PART_MILLIS|DATE_PART_STR|DATE_RANGE_MILLIS|DATE_RANGE_STR|DATE_TRUNC_MILLIS|DATE_TRUNC_STR|DECODE_JSON|DEGREES|DURATION_TO_STR|E|ENCODED_SIZE|ENCODE_JSON|EXP|FLOOR|GREATEST|HAS_TOKEN|IFINF|IFMISSING|IFMISSINGORNULL|IFNAN|IFNANORINF|IFNULL|INITCAP|ISARRAY|ISATOM|ISBOOLEAN|ISNUMBER|ISOBJECT|ISSTRING|IsBitSET|LEAST|LENGTH|LN|LOG|LOWER|LTRIM|MAX|META|MILLIS|MILLIS_TO_LOCAL|MILLIS_TO_STR|MILLIS_TO_TZ|MILLIS_TO_UTC|MILLIS_TO_ZONE_NAME|MIN|MISSINGIF|NANIF|NEGINFIF|NOW_LOCAL|NOW_MILLIS|NOW_STR|NOW_TZ|NOW_UTC|NULLIF|OBJECT_ADD|OBJECT_CONCAT|OBJECT_INNER_PAIRS|OBJECT_INNER_VALUES|OBJECT_LENGTH|OBJECT_NAMES|OBJECT_PAIRS|OBJECT_PUT|OBJECT_REMOVE|OBJECT_RENAME|OBJECT_REPLACE|OBJECT_UNWRAP|OBJECT_VALUES|PAIRS|PI|POLY_LENGTH|POSINFIF|POSITION|POWER|RADIANS|RANDOM|REGEXP_CONTAINS|REGEXP_LIKE|REGEXP_POSITION|REGEXP_REPLACE|REPEAT|REPLACE|REVERSE|ROUND|RTRIM|SIGN|SIN|SPLIT|SQRT|STR_TO_DURATION|STR_TO_MILLIS|STR_TO_TZ|STR_TO_UTC|STR_TO_ZONE_NAME|SUBSTR|SUFFIXES|SUM|TAN|TITLE|TOARRAY|TOATOM|TOBOOLEAN|TOKENS|TOKENS|TONUMBER|TOOBJECT|TOSTRING|TRIM|TRUNC|TYPE|UPPER|WEEKDAY_MILLIS|WEEKDAY_STR)(?=\s*\()/i, + 'keyword': /\b(?:ALL|ALTER|ANALYZE|AS|ASC|BEGIN|BINARY|BOOLEAN|BREAK|BUCKET|BUILD|BY|CALL|CAST|CLUSTER|COLLATE|COLLECTION|COMMIT|CONNECT|CONTINUE|CORRELATE|COVER|CREATE|DATABASE|DATASET|DATASTORE|DECLARE|DECREMENT|DELETE|DERIVED|DESC|DESCRIBE|DISTINCT|DO|DROP|EACH|ELEMENT|EXCEPT|EXCLUDE|EXECUTE|EXPLAIN|FETCH|FLATTEN|FOR|FORCE|FROM|FUNCTION|GRANT|GROUP|GSI|HAVING|IF|IGNORE|ILIKE|INCLUDE|INCREMENT|INDEX|INFER|INLINE|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KEYS|KEYSPACE|KNOWN|LAST|LEFT|LET|LETTING|LIMIT|LSM|MAP|MAPPING|MATCHED|MATERIALIZED|MERGE|MINUS|MISSING|NAMESPACE|NEST|NULL|NUMBER|OBJECT|OFFSET|ON|OPTION|ORDER|OUTER|OVER|PARSE|PARTITION|PASSWORD|PATH|POOL|PREPARE|PRIMARY|PRIVATE|PRIVILEGE|PROCEDURE|PUBLIC|RAW|REALM|REDUCE|RENAME|RETURN|RETURNING|REVOKE|RIGHT|ROLE|ROLLBACK|SATISFIES|SCHEMA|SELECT|SELF|SEMI|SET|SHOW|SOME|START|STATISTICS|STRING|SYSTEM|TO|TRANSACTION|TRIGGER|TRUNCATE|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNSET|UPDATE|UPSERT|USE|USER|USING|VALIDATE|VALUE|VALUES|VIA|VIEW|WHERE|WHILE|WITH|WORK|XOR)\b/i, + 'boolean': /\b(?:TRUE|FALSE)\b/i, + 'number': /(?:\b\d+\.|\B\.)\d+e[+\-]?\d+\b|\b\d+\.?\d*|\B\.\d+\b/i, + 'operator': /[-+*\/=%]|!=|==?|\|\||<[>=]?|>=?|\b(?:AND|ANY|ARRAY|BETWEEN|CASE|ELSE|END|EVERY|EXISTS|FIRST|IN|LIKE|NOT|OR|THEN|VALUED|WHEN|WITHIN)\b/i, + 'punctuation': /[;[\](),.{}:]/ +}; \ No newline at end of file diff --git a/components/prism-n1ql.min.js b/components/prism-n1ql.min.js new file mode 100644 index 0000000000..cfe751b738 --- /dev/null +++ b/components/prism-n1ql.min.js @@ -0,0 +1 @@ +Prism.languages.n1ql={comment:/\/\*[\s\S]*?(?:$|\*\/)/,parameter:/\$[\w.]+/,string:{pattern:/(["'])(?:\\[\s\S]|(?!\1)[^\\]|\1\1)*\1/,greedy:!0},identifier:{pattern:/`(?:\\[\s\S]|[^\\`]|``)*`/,greedy:!0},"function":/\b(?:ABS|ACOS|ARRAY_AGG|ARRAY_APPEND|ARRAY_AVG|ARRAY_CONCAT|ARRAY_CONTAINS|ARRAY_COUNT|ARRAY_DISTINCT|ARRAY_FLATTEN|ARRAY_IFNULL|ARRAY_INSERT|ARRAY_INTERSECT|ARRAY_LENGTH|ARRAY_MAX|ARRAY_MIN|ARRAY_POSITION|ARRAY_PREPEND|ARRAY_PUT|ARRAY_RANGE|ARRAY_REMOVE|ARRAY_REPEAT|ARRAY_REPLACE|ARRAY_REVERSE|ARRAY_SORT|ARRAY_STAR|ARRAY_SUM|ARRAY_SYMDIFF|ARRAY_SYMDIFFN|ARRAY_UNION|ASIN|ATAN|ATAN2|AVG|BASE64|BASE64_DECODE|BASE64_ENCODE|BITAND|BITCLEAR|BITNOT|BITOR|BITSET|BITSHIFT|BITTEST|BITXOR|CEIL|CLOCK_LOCAL|CLOCK_MILLIS|CLOCK_STR|CLOCK_TZ|CLOCK_UTC|CONTAINS|CONTAINS_TOKEN|CONTAINS_TOKEN_LIKE|CONTAINS_TOKEN_REGEXP|COS|COUNT|CURL|DATE_ADD_MILLIS|DATE_ADD_STR|DATE_DIFF_MILLIS|DATE_DIFF_STR|DATE_FORMAT_STR|DATE_PART_MILLIS|DATE_PART_STR|DATE_RANGE_MILLIS|DATE_RANGE_STR|DATE_TRUNC_MILLIS|DATE_TRUNC_STR|DECODE_JSON|DEGREES|DURATION_TO_STR|E|ENCODED_SIZE|ENCODE_JSON|EXP|FLOOR|GREATEST|HAS_TOKEN|IFINF|IFMISSING|IFMISSINGORNULL|IFNAN|IFNANORINF|IFNULL|INITCAP|ISARRAY|ISATOM|ISBOOLEAN|ISNUMBER|ISOBJECT|ISSTRING|IsBitSET|LEAST|LENGTH|LN|LOG|LOWER|LTRIM|MAX|META|MILLIS|MILLIS_TO_LOCAL|MILLIS_TO_STR|MILLIS_TO_TZ|MILLIS_TO_UTC|MILLIS_TO_ZONE_NAME|MIN|MISSINGIF|NANIF|NEGINFIF|NOW_LOCAL|NOW_MILLIS|NOW_STR|NOW_TZ|NOW_UTC|NULLIF|OBJECT_ADD|OBJECT_CONCAT|OBJECT_INNER_PAIRS|OBJECT_INNER_VALUES|OBJECT_LENGTH|OBJECT_NAMES|OBJECT_PAIRS|OBJECT_PUT|OBJECT_REMOVE|OBJECT_RENAME|OBJECT_REPLACE|OBJECT_UNWRAP|OBJECT_VALUES|PAIRS|PI|POLY_LENGTH|POSINFIF|POSITION|POWER|RADIANS|RANDOM|REGEXP_CONTAINS|REGEXP_LIKE|REGEXP_POSITION|REGEXP_REPLACE|REPEAT|REPLACE|REVERSE|ROUND|RTRIM|SIGN|SIN|SPLIT|SQRT|STR_TO_DURATION|STR_TO_MILLIS|STR_TO_TZ|STR_TO_UTC|STR_TO_ZONE_NAME|SUBSTR|SUFFIXES|SUM|TAN|TITLE|TOARRAY|TOATOM|TOBOOLEAN|TOKENS|TOKENS|TONUMBER|TOOBJECT|TOSTRING|TRIM|TRUNC|TYPE|UPPER|WEEKDAY_MILLIS|WEEKDAY_STR)(?=\s*\()/i,keyword:/\b(?:ALL|ALTER|ANALYZE|AS|ASC|BEGIN|BINARY|BOOLEAN|BREAK|BUCKET|BUILD|BY|CALL|CAST|CLUSTER|COLLATE|COLLECTION|COMMIT|CONNECT|CONTINUE|CORRELATE|COVER|CREATE|DATABASE|DATASET|DATASTORE|DECLARE|DECREMENT|DELETE|DERIVED|DESC|DESCRIBE|DISTINCT|DO|DROP|EACH|ELEMENT|EXCEPT|EXCLUDE|EXECUTE|EXPLAIN|FETCH|FLATTEN|FOR|FORCE|FROM|FUNCTION|GRANT|GROUP|GSI|HAVING|IF|IGNORE|ILIKE|INCLUDE|INCREMENT|INDEX|INFER|INLINE|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KEYS|KEYSPACE|KNOWN|LAST|LEFT|LET|LETTING|LIMIT|LSM|MAP|MAPPING|MATCHED|MATERIALIZED|MERGE|MINUS|MISSING|NAMESPACE|NEST|NULL|NUMBER|OBJECT|OFFSET|ON|OPTION|ORDER|OUTER|OVER|PARSE|PARTITION|PASSWORD|PATH|POOL|PREPARE|PRIMARY|PRIVATE|PRIVILEGE|PROCEDURE|PUBLIC|RAW|REALM|REDUCE|RENAME|RETURN|RETURNING|REVOKE|RIGHT|ROLE|ROLLBACK|SATISFIES|SCHEMA|SELECT|SELF|SEMI|SET|SHOW|SOME|START|STATISTICS|STRING|SYSTEM|TO|TRANSACTION|TRIGGER|TRUNCATE|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNSET|UPDATE|UPSERT|USE|USER|USING|VALIDATE|VALUE|VALUES|VIA|VIEW|WHERE|WHILE|WITH|WORK|XOR)\b/i,"boolean":/\b(?:TRUE|FALSE)\b/i,number:/(?:\b\d+\.|\B\.)\d+e[+\-]?\d+\b|\b\d+\.?\d*|\B\.\d+\b/i,operator:/[-+*\/=%]|!=|==?|\|\||<[>=]?|>=?|\b(?:AND|ANY|ARRAY|BETWEEN|CASE|ELSE|END|EVERY|EXISTS|FIRST|IN|LIKE|NOT|OR|THEN|VALUED|WHEN|WITHIN)\b/i,punctuation:/[;[\](),.{}:]/}; \ No newline at end of file diff --git a/examples/prism-n1ql.html b/examples/prism-n1ql.html new file mode 100644 index 0000000000..1f5866e0e7 --- /dev/null +++ b/examples/prism-n1ql.html @@ -0,0 +1,33 @@ +

Comments

+
# /* Multi-line
+comment */
+ +

Strings

+
"foo \"bar\" baz"
+'foo \'bar\' baz'
+"Multi-line strings
+are supported"
+'Multi-line strings
+are supported'
+ +

Parameters

+
 $1 $2 $3 
+ +

Operators

+
SELECT 1 AND 1;
+SELECT 1 OR NULL;
+SELECT EXISTS 1;
+SELECT 2 BETWEEN 1 AND 3;
+ +

Functions and keywords

+
SELECT COUNT(*) AS total, MAX(foo) AS max_foo
+FROM `my_bucket`
+WHERE `foo` IS NOT NULL;
+CREATE INDEX productName_index1 ON bucket_name(productName, ProductID)
+WHERE type="product" USING GSI
+WITH {"nodes":["node1:8091", "node2:8091", "node3:8091"]};
+ +

Identifiers

+
SELECT *
+FROM `my_bucket`;
+
\ No newline at end of file diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 0261021a7f..72e03f986b 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -11,7 +11,7 @@ if (!Prism.plugins.toolbar) { } // The languages map is built automatically with gulp -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Shell","basic":"BASIC","csharp":"C#","cpp":"C++","cil":"CIL","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","graphql":"GraphQL","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javastacktrace":"Java stack trace","json":"JSON","jsonp":"JSONP","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Shell","basic":"BASIC","csharp":"C#","cpp":"C++","cil":"CIL","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","graphql":"GraphQL","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javastacktrace":"Java stack trace","json":"JSON","jsonp":"JSONP","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n1ql":"N1QL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; if (!pre || !/pre/i.test(pre.nodeName)) { diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index fa96e7c5f5..c997a658cf 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Shell",basic:"BASIC",csharp:"C#",cpp:"C++",cil:"CIL",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",graphql:"GraphQL",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javastacktrace:"Java stack trace",json:"JSON",jsonp:"JSONP",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var r=document.createElement("span");return r.textContent=s,r}}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Shell",basic:"BASIC",csharp:"C#",cpp:"C++",cil:"CIL",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",graphql:"GraphQL",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javastacktrace:"Java stack trace",json:"JSON",jsonp:"JSONP",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var r=document.createElement("span");return r.textContent=s,r}}})}}(); \ No newline at end of file diff --git a/tests/languages/n1ql/boolean_feature.test b/tests/languages/n1ql/boolean_feature.test new file mode 100644 index 0000000000..0037fbbdd5 --- /dev/null +++ b/tests/languages/n1ql/boolean_feature.test @@ -0,0 +1,14 @@ +TRUE +FALSE + + +---------------------------------------------------- + +[ + ["boolean", "TRUE"], + ["boolean", "FALSE"] +] + +---------------------------------------------------- + +Checks for booleans. \ No newline at end of file diff --git a/tests/languages/n1ql/comment_feature.test b/tests/languages/n1ql/comment_feature.test new file mode 100644 index 0000000000..f8752fb7d9 --- /dev/null +++ b/tests/languages/n1ql/comment_feature.test @@ -0,0 +1,14 @@ +/**/ +/* foo +bar */ + +---------------------------------------------------- + +[ + ["comment", "/**/"], + ["comment", "/* foo\r\nbar */"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/tests/languages/n1ql/function_feature.test b/tests/languages/n1ql/function_feature.test new file mode 100644 index 0000000000..35f65fd5cb --- /dev/null +++ b/tests/languages/n1ql/function_feature.test @@ -0,0 +1,359 @@ +ABS( +ACOS( +ARRAY_AGG( +ARRAY_APPEND( +ARRAY_AVG( +ARRAY_CONCAT( +ARRAY_CONTAINS( +ARRAY_COUNT( +ARRAY_DISTINCT( +ARRAY_FLATTEN( +ARRAY_IFNULL( +ARRAY_INSERT( +ARRAY_INTERSECT( +ARRAY_LENGTH( +ARRAY_MAX( +ARRAY_MIN( +ARRAY_POSITION( +ARRAY_PREPEND( +ARRAY_PUT( +ARRAY_RANGE( +ARRAY_REMOVE( +ARRAY_REPEAT( +ARRAY_REPLACE( +ARRAY_REVERSE( +ARRAY_SORT( +ARRAY_STAR( +ARRAY_SUM( +ARRAY_SYMDIFF( +ARRAY_SYMDIFFN( +ARRAY_UNION( +ASIN( +ATAN( +ATAN2( +AVG( +BASE64( +BASE64_DECODE( +BASE64_ENCODE( +BITAND( +BITCLEAR( +BITNOT( +BITOR( +BITSET( +BITSHIFT( +BITTEST( +BITXOR( +CEIL( +CLOCK_LOCAL( +CLOCK_MILLIS( +CLOCK_STR( +CLOCK_TZ( +CLOCK_UTC( +CONTAINS( +CONTAINS_TOKEN( +CONTAINS_TOKEN_LIKE( +CONTAINS_TOKEN_REGEXP( +COS( +COUNT( +CURL( +DATE_ADD_MILLIS( +DATE_ADD_STR( +DATE_DIFF_MILLIS( +DATE_DIFF_STR( +DATE_FORMAT_STR( +DATE_PART_MILLIS( +DATE_PART_STR( +DATE_RANGE_MILLIS( +DATE_RANGE_STR( +DATE_TRUNC_MILLIS( +DATE_TRUNC_STR( +DECODE_JSON( +DEGREES( +DURATION_TO_STR( +E( +ENCODED_SIZE( +ENCODE_JSON( +EXP( +FLOOR( +GREATEST( +HAS_TOKEN( +IFINF( +IFMISSING( +IFMISSINGORNULL( +IFNAN( +IFNANORINF( +IFNULL( +INITCAP( +ISARRAY( +ISATOM( +ISBOOLEAN( +ISNUMBER( +ISOBJECT( +ISSTRING( +IsBitSET( +LEAST( +LENGTH( +LN( +LOG( +LOWER( +LTRIM( +MAX( +META( +MILLIS( +MILLIS_TO_LOCAL( +MILLIS_TO_STR( +MILLIS_TO_TZ( +MILLIS_TO_UTC( +MILLIS_TO_ZONE_NAME( +MIN( +MISSINGIF( +NANIF( +NEGINFIF( +NOW_LOCAL( +NOW_MILLIS( +NOW_STR( +NOW_TZ( +NOW_UTC( +NULLIF( +OBJECT_ADD( +OBJECT_CONCAT( +OBJECT_INNER_PAIRS( +OBJECT_INNER_VALUES( +OBJECT_LENGTH( +OBJECT_NAMES( +OBJECT_PAIRS( +OBJECT_PUT( +OBJECT_REMOVE( +OBJECT_RENAME( +OBJECT_REPLACE( +OBJECT_UNWRAP( +OBJECT_VALUES( +PAIRS( +PI( +POLY_LENGTH( +POSINFIF( +POSITION( +POWER( +RADIANS( +RANDOM( +REGEXP_CONTAINS( +REGEXP_LIKE( +REGEXP_POSITION( +REGEXP_REPLACE( +REPEAT( +REPLACE( +REVERSE( +ROUND( +RTRIM( +SIGN( +SIN( +SPLIT( +SQRT( +STR_TO_DURATION( +STR_TO_MILLIS( +STR_TO_TZ( +STR_TO_UTC( +STR_TO_ZONE_NAME( +SUBSTR( +SUFFIXES( +SUM( +TAN( +TITLE( +TOARRAY( +TOATOM( +TOBOOLEAN( +TOKENS( +TOKENS( +TONUMBER( +TOOBJECT( +TOSTRING( +TRIM( +TRUNC( +TYPE( +UPPER( +WEEKDAY_MILLIS( +WEEKDAY_STR( + +---------------------------------------------------- + +[ + ["function", "ABS"], ["punctuation", "("], + ["function", "ACOS"], ["punctuation", "("], + ["function", "ARRAY_AGG"], ["punctuation", "("], + ["function", "ARRAY_APPEND"], ["punctuation", "("], + ["function", "ARRAY_AVG"], ["punctuation", "("], + ["function", "ARRAY_CONCAT"], ["punctuation", "("], + ["function", "ARRAY_CONTAINS"], ["punctuation", "("], + ["function", "ARRAY_COUNT"], ["punctuation", "("], + ["function", "ARRAY_DISTINCT"], ["punctuation", "("], + ["function", "ARRAY_FLATTEN"], ["punctuation", "("], + ["function", "ARRAY_IFNULL"], ["punctuation", "("], + ["function", "ARRAY_INSERT"], ["punctuation", "("], + ["function", "ARRAY_INTERSECT"], ["punctuation", "("], + ["function", "ARRAY_LENGTH"], ["punctuation", "("], + ["function", "ARRAY_MAX"], ["punctuation", "("], + ["function", "ARRAY_MIN"], ["punctuation", "("], + ["function", "ARRAY_POSITION"], ["punctuation", "("], + ["function", "ARRAY_PREPEND"], ["punctuation", "("], + ["function", "ARRAY_PUT"], ["punctuation", "("], + ["function", "ARRAY_RANGE"], ["punctuation", "("], + ["function", "ARRAY_REMOVE"], ["punctuation", "("], + ["function", "ARRAY_REPEAT"], ["punctuation", "("], + ["function", "ARRAY_REPLACE"], ["punctuation", "("], + ["function", "ARRAY_REVERSE"], ["punctuation", "("], + ["function", "ARRAY_SORT"], ["punctuation", "("], + ["function", "ARRAY_STAR"], ["punctuation", "("], + ["function", "ARRAY_SUM"], ["punctuation", "("], + ["function", "ARRAY_SYMDIFF"], ["punctuation", "("], + ["function", "ARRAY_SYMDIFFN"], ["punctuation", "("], + ["function", "ARRAY_UNION"], ["punctuation", "("], + ["function", "ASIN"], ["punctuation", "("], + ["function", "ATAN"], ["punctuation", "("], + ["function", "ATAN2"], ["punctuation", "("], + ["function", "AVG"], ["punctuation", "("], + ["function", "BASE64"], ["punctuation", "("], + ["function", "BASE64_DECODE"], ["punctuation", "("], + ["function", "BASE64_ENCODE"], ["punctuation", "("], + ["function", "BITAND"], ["punctuation", "("], + ["function", "BITCLEAR"], ["punctuation", "("], + ["function", "BITNOT"], ["punctuation", "("], + ["function", "BITOR"], ["punctuation", "("], + ["function", "BITSET"], ["punctuation", "("], + ["function", "BITSHIFT"], ["punctuation", "("], + ["function", "BITTEST"], ["punctuation", "("], + ["function", "BITXOR"], ["punctuation", "("], + ["function", "CEIL"], ["punctuation", "("], + ["function", "CLOCK_LOCAL"], ["punctuation", "("], + ["function", "CLOCK_MILLIS"], ["punctuation", "("], + ["function", "CLOCK_STR"], ["punctuation", "("], + ["function", "CLOCK_TZ"], ["punctuation", "("], + ["function", "CLOCK_UTC"], ["punctuation", "("], + ["function", "CONTAINS"], ["punctuation", "("], + ["function", "CONTAINS_TOKEN"], ["punctuation", "("], + ["function", "CONTAINS_TOKEN_LIKE"], ["punctuation", "("], + ["function", "CONTAINS_TOKEN_REGEXP"], ["punctuation", "("], + ["function", "COS"], ["punctuation", "("], + ["function", "COUNT"], ["punctuation", "("], + ["function", "CURL"], ["punctuation", "("], + ["function", "DATE_ADD_MILLIS"], ["punctuation", "("], + ["function", "DATE_ADD_STR"], ["punctuation", "("], + ["function", "DATE_DIFF_MILLIS"], ["punctuation", "("], + ["function", "DATE_DIFF_STR"], ["punctuation", "("], + ["function", "DATE_FORMAT_STR"], ["punctuation", "("], + ["function", "DATE_PART_MILLIS"], ["punctuation", "("], + ["function", "DATE_PART_STR"], ["punctuation", "("], + ["function", "DATE_RANGE_MILLIS"], ["punctuation", "("], + ["function", "DATE_RANGE_STR"], ["punctuation", "("], + ["function", "DATE_TRUNC_MILLIS"], ["punctuation", "("], + ["function", "DATE_TRUNC_STR"], ["punctuation", "("], + ["function", "DECODE_JSON"], ["punctuation", "("], + ["function", "DEGREES"], ["punctuation", "("], + ["function", "DURATION_TO_STR"], ["punctuation", "("], + ["function", "E"], ["punctuation", "("], + ["function", "ENCODED_SIZE"], ["punctuation", "("], + ["function", "ENCODE_JSON"], ["punctuation", "("], + ["function", "EXP"], ["punctuation", "("], + ["function", "FLOOR"], ["punctuation", "("], + ["function", "GREATEST"], ["punctuation", "("], + ["function", "HAS_TOKEN"], ["punctuation", "("], + ["function", "IFINF"], ["punctuation", "("], + ["function", "IFMISSING"], ["punctuation", "("], + ["function", "IFMISSINGORNULL"], ["punctuation", "("], + ["function", "IFNAN"], ["punctuation", "("], + ["function", "IFNANORINF"], ["punctuation", "("], + ["function", "IFNULL"], ["punctuation", "("], + ["function", "INITCAP"], ["punctuation", "("], + ["function", "ISARRAY"], ["punctuation", "("], + ["function", "ISATOM"], ["punctuation", "("], + ["function", "ISBOOLEAN"], ["punctuation", "("], + ["function", "ISNUMBER"], ["punctuation", "("], + ["function", "ISOBJECT"], ["punctuation", "("], + ["function", "ISSTRING"], ["punctuation", "("], + ["function", "IsBitSET"], ["punctuation", "("], + ["function", "LEAST"], ["punctuation", "("], + ["function", "LENGTH"], ["punctuation", "("], + ["function", "LN"], ["punctuation", "("], + ["function", "LOG"], ["punctuation", "("], + ["function", "LOWER"], ["punctuation", "("], + ["function", "LTRIM"], ["punctuation", "("], + ["function", "MAX"], ["punctuation", "("], + ["function", "META"], ["punctuation", "("], + ["function", "MILLIS"], ["punctuation", "("], + ["function", "MILLIS_TO_LOCAL"], ["punctuation", "("], + ["function", "MILLIS_TO_STR"], ["punctuation", "("], + ["function", "MILLIS_TO_TZ"], ["punctuation", "("], + ["function", "MILLIS_TO_UTC"], ["punctuation", "("], + ["function", "MILLIS_TO_ZONE_NAME"], ["punctuation", "("], + ["function", "MIN"], ["punctuation", "("], + ["function", "MISSINGIF"], ["punctuation", "("], + ["function", "NANIF"], ["punctuation", "("], + ["function", "NEGINFIF"], ["punctuation", "("], + ["function", "NOW_LOCAL"], ["punctuation", "("], + ["function", "NOW_MILLIS"], ["punctuation", "("], + ["function", "NOW_STR"], ["punctuation", "("], + ["function", "NOW_TZ"], ["punctuation", "("], + ["function", "NOW_UTC"], ["punctuation", "("], + ["function", "NULLIF"], ["punctuation", "("], + ["function", "OBJECT_ADD"], ["punctuation", "("], + ["function", "OBJECT_CONCAT"], ["punctuation", "("], + ["function", "OBJECT_INNER_PAIRS"], ["punctuation", "("], + ["function", "OBJECT_INNER_VALUES"], ["punctuation", "("], + ["function", "OBJECT_LENGTH"], ["punctuation", "("], + ["function", "OBJECT_NAMES"], ["punctuation", "("], + ["function", "OBJECT_PAIRS"], ["punctuation", "("], + ["function", "OBJECT_PUT"], ["punctuation", "("], + ["function", "OBJECT_REMOVE"], ["punctuation", "("], + ["function", "OBJECT_RENAME"], ["punctuation", "("], + ["function", "OBJECT_REPLACE"], ["punctuation", "("], + ["function", "OBJECT_UNWRAP"], ["punctuation", "("], + ["function", "OBJECT_VALUES"], ["punctuation", "("], + ["function", "PAIRS"], ["punctuation", "("], + ["function", "PI"], ["punctuation", "("], + ["function", "POLY_LENGTH"], ["punctuation", "("], + ["function", "POSINFIF"], ["punctuation", "("], + ["function", "POSITION"], ["punctuation", "("], + ["function", "POWER"], ["punctuation", "("], + ["function", "RADIANS"], ["punctuation", "("], + ["function", "RANDOM"], ["punctuation", "("], + ["function", "REGEXP_CONTAINS"], ["punctuation", "("], + ["function", "REGEXP_LIKE"], ["punctuation", "("], + ["function", "REGEXP_POSITION"], ["punctuation", "("], + ["function", "REGEXP_REPLACE"], ["punctuation", "("], + ["function", "REPEAT"], ["punctuation", "("], + ["function", "REPLACE"], ["punctuation", "("], + ["function", "REVERSE"], ["punctuation", "("], + ["function", "ROUND"], ["punctuation", "("], + ["function", "RTRIM"], ["punctuation", "("], + ["function", "SIGN"], ["punctuation", "("], + ["function", "SIN"], ["punctuation", "("], + ["function", "SPLIT"], ["punctuation", "("], + ["function", "SQRT"], ["punctuation", "("], + ["function", "STR_TO_DURATION"], ["punctuation", "("], + ["function", "STR_TO_MILLIS"], ["punctuation", "("], + ["function", "STR_TO_TZ"], ["punctuation", "("], + ["function", "STR_TO_UTC"], ["punctuation", "("], + ["function", "STR_TO_ZONE_NAME"], ["punctuation", "("], + ["function", "SUBSTR"], ["punctuation", "("], + ["function", "SUFFIXES"], ["punctuation", "("], + ["function", "SUM"], ["punctuation", "("], + ["function", "TAN"], ["punctuation", "("], + ["function", "TITLE"], ["punctuation", "("], + ["function", "TOARRAY"], ["punctuation", "("], + ["function", "TOATOM"], ["punctuation", "("], + ["function", "TOBOOLEAN"], ["punctuation", "("], + ["function", "TOKENS"], ["punctuation", "("], + ["function", "TOKENS"], ["punctuation", "("], + ["function", "TONUMBER"], ["punctuation", "("], + ["function", "TOOBJECT"], ["punctuation", "("], + ["function", "TOSTRING"], ["punctuation", "("], + ["function", "TRIM"], ["punctuation", "("], + ["function", "TRUNC"], ["punctuation", "("], + ["function", "TYPE"], ["punctuation", "("], + ["function", "UPPER"], ["punctuation", "("], + ["function", "WEEKDAY_MILLIS"], ["punctuation", "("], + ["function", "WEEKDAY_STR"], ["punctuation", "("] +] + +---------------------------------------------------- + +Checks for functions. \ No newline at end of file diff --git a/tests/languages/n1ql/identifier_feature.test b/tests/languages/n1ql/identifier_feature.test new file mode 100644 index 0000000000..b7cf071ed0 --- /dev/null +++ b/tests/languages/n1ql/identifier_feature.test @@ -0,0 +1,19 @@ +`` +`foo` +`foo bar` +`foo +bar` + + +---------------------------------------------------- + +[ + ["identifier", "``"], + ["identifier", "`foo`"], + ["identifier", "`foo bar`"], + ["identifier", "`foo\r\nbar`"] +] + +---------------------------------------------------- + +Checks for escaped identifiers. \ No newline at end of file diff --git a/tests/languages/n1ql/keyword_feature.test b/tests/languages/n1ql/keyword_feature.test new file mode 100644 index 0000000000..4e9aace092 --- /dev/null +++ b/tests/languages/n1ql/keyword_feature.test @@ -0,0 +1,311 @@ +ALL +ALTER +ANALYZE +AS +ASC +BEGIN +BINARY +BOOLEAN +BREAK +BUCKET +BUILD +BY +CALL +CAST +CLUSTER +COLLATE +COLLECTION +COMMIT +CONNECT +CONTINUE +CORRELATE +COVER +CREATE +DATABASE +DATASET +DATASTORE +DECLARE +DECREMENT +DELETE +DERIVED +DESC +DESCRIBE +DISTINCT +DO +DROP +EACH +ELEMENT +EXCEPT +EXCLUDE +EXECUTE +EXPLAIN +FETCH +FLATTEN +FOR +FORCE +FROM +FUNCTION +GRANT +GROUP +GSI +HAVING +IF +IGNORE +ILIKE +INCLUDE +INCREMENT +INDEX +INFER +INLINE +INNER +INSERT +INTERSECT +INTO +IS +JOIN +KEY +KEYS +KEYSPACE +KNOWN +LAST +LEFT +LET +LETTING +LIMIT +LSM +MAP +MAPPING +MATCHED +MATERIALIZED +MERGE +MINUS +MISSING +NAMESPACE +NEST +NULL +NUMBER +OBJECT +OFFSET +ON +OPTION +ORDER +OUTER +OVER +PARSE +PARTITION +PASSWORD +PATH +POOL +PREPARE +PRIMARY +PRIVATE +PRIVILEGE +PROCEDURE +PUBLIC +RAW +REALM +REDUCE +RENAME +RETURN +RETURNING +REVOKE +RIGHT +ROLE +ROLLBACK +SATISFIES +SCHEMA +SELECT +SELF +SEMI +SET +SHOW +SOME +START +STATISTICS +STRING +SYSTEM +TO +TRANSACTION +TRIGGER +TRUNCATE +UNDER +UNION +UNIQUE +UNKNOWN +UNNEST +UNSET +UPDATE +UPSERT +USE +USER +USING +VALIDATE +VALUE +VALUES +VIA +VIEW +WHERE +WHILE +WITH +WORK +XOR + +---------------------------------------------------- + +[ + ["keyword", "ALL"], + ["keyword", "ALTER"], + ["keyword", "ANALYZE"], + ["keyword", "AS"], + ["keyword", "ASC"], + ["keyword", "BEGIN"], + ["keyword", "BINARY"], + ["keyword", "BOOLEAN"], + ["keyword", "BREAK"], + ["keyword", "BUCKET"], + ["keyword", "BUILD"], + ["keyword", "BY"], + ["keyword", "CALL"], + ["keyword", "CAST"], + ["keyword", "CLUSTER"], + ["keyword", "COLLATE"], + ["keyword", "COLLECTION"], + ["keyword", "COMMIT"], + ["keyword", "CONNECT"], + ["keyword", "CONTINUE"], + ["keyword", "CORRELATE"], + ["keyword", "COVER"], + ["keyword", "CREATE"], + ["keyword", "DATABASE"], + ["keyword", "DATASET"], + ["keyword", "DATASTORE"], + ["keyword", "DECLARE"], + ["keyword", "DECREMENT"], + ["keyword", "DELETE"], + ["keyword", "DERIVED"], + ["keyword", "DESC"], + ["keyword", "DESCRIBE"], + ["keyword", "DISTINCT"], + ["keyword", "DO"], + ["keyword", "DROP"], + ["keyword", "EACH"], + ["keyword", "ELEMENT"], + ["keyword", "EXCEPT"], + ["keyword", "EXCLUDE"], + ["keyword", "EXECUTE"], + ["keyword", "EXPLAIN"], + ["keyword", "FETCH"], + ["keyword", "FLATTEN"], + ["keyword", "FOR"], + ["keyword", "FORCE"], + ["keyword", "FROM"], + ["keyword", "FUNCTION"], + ["keyword", "GRANT"], + ["keyword", "GROUP"], + ["keyword", "GSI"], + ["keyword", "HAVING"], + ["keyword", "IF"], + ["keyword", "IGNORE"], + ["keyword", "ILIKE"], + ["keyword", "INCLUDE"], + ["keyword", "INCREMENT"], + ["keyword", "INDEX"], + ["keyword", "INFER"], + ["keyword", "INLINE"], + ["keyword", "INNER"], + ["keyword", "INSERT"], + ["keyword", "INTERSECT"], + ["keyword", "INTO"], + ["keyword", "IS"], + ["keyword", "JOIN"], + ["keyword", "KEY"], + ["keyword", "KEYS"], + ["keyword", "KEYSPACE"], + ["keyword", "KNOWN"], + ["keyword", "LAST"], + ["keyword", "LEFT"], + ["keyword", "LET"], + ["keyword", "LETTING"], + ["keyword", "LIMIT"], + ["keyword", "LSM"], + ["keyword", "MAP"], + ["keyword", "MAPPING"], + ["keyword", "MATCHED"], + ["keyword", "MATERIALIZED"], + ["keyword", "MERGE"], + ["keyword", "MINUS"], + ["keyword", "MISSING"], + ["keyword", "NAMESPACE"], + ["keyword", "NEST"], + ["keyword", "NULL"], + ["keyword", "NUMBER"], + ["keyword", "OBJECT"], + ["keyword", "OFFSET"], + ["keyword", "ON"], + ["keyword", "OPTION"], + ["keyword", "ORDER"], + ["keyword", "OUTER"], + ["keyword", "OVER"], + ["keyword", "PARSE"], + ["keyword", "PARTITION"], + ["keyword", "PASSWORD"], + ["keyword", "PATH"], + ["keyword", "POOL"], + ["keyword", "PREPARE"], + ["keyword", "PRIMARY"], + ["keyword", "PRIVATE"], + ["keyword", "PRIVILEGE"], + ["keyword", "PROCEDURE"], + ["keyword", "PUBLIC"], + ["keyword", "RAW"], + ["keyword", "REALM"], + ["keyword", "REDUCE"], + ["keyword", "RENAME"], + ["keyword", "RETURN"], + ["keyword", "RETURNING"], + ["keyword", "REVOKE"], + ["keyword", "RIGHT"], + ["keyword", "ROLE"], + ["keyword", "ROLLBACK"], + ["keyword", "SATISFIES"], + ["keyword", "SCHEMA"], + ["keyword", "SELECT"], + ["keyword", "SELF"], + ["keyword", "SEMI"], + ["keyword", "SET"], + ["keyword", "SHOW"], + ["keyword", "SOME"], + ["keyword", "START"], + ["keyword", "STATISTICS"], + ["keyword", "STRING"], + ["keyword", "SYSTEM"], + ["keyword", "TO"], + ["keyword", "TRANSACTION"], + ["keyword", "TRIGGER"], + ["keyword", "TRUNCATE"], + ["keyword", "UNDER"], + ["keyword", "UNION"], + ["keyword", "UNIQUE"], + ["keyword", "UNKNOWN"], + ["keyword", "UNNEST"], + ["keyword", "UNSET"], + ["keyword", "UPDATE"], + ["keyword", "UPSERT"], + ["keyword", "USE"], + ["keyword", "USER"], + ["keyword", "USING"], + ["keyword", "VALIDATE"], + ["keyword", "VALUE"], + ["keyword", "VALUES"], + ["keyword", "VIA"], + ["keyword", "VIEW"], + ["keyword", "WHERE"], + ["keyword", "WHILE"], + ["keyword", "WITH"], + ["keyword", "WORK"], + ["keyword", "XOR"] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/tests/languages/n1ql/number_feature.test b/tests/languages/n1ql/number_feature.test new file mode 100644 index 0000000000..813e99c6e7 --- /dev/null +++ b/tests/languages/n1ql/number_feature.test @@ -0,0 +1,19 @@ +42 +0.154 +3.1E+7 +.02e2 +2. + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "0.154"], + ["number", "3.1E+7"], + ["number", ".02e2"], + ["number", "2."] +] + +---------------------------------------------------- + +Checks for integers, decimal and e-notation numbers. \ No newline at end of file diff --git a/tests/languages/n1ql/operator_feature.test b/tests/languages/n1ql/operator_feature.test new file mode 100644 index 0000000000..7162c02a7b --- /dev/null +++ b/tests/languages/n1ql/operator_feature.test @@ -0,0 +1,56 @@ ++ - * / += % || +!= +< <= <> +> >= + +AND +ANY +ARRAY +BETWEEN +CASE +ELSE +END +EVERY +EXISTS +FIRST +IN +LIKE +NOT +OR +THEN +VALUED +WHEN +WITHIN + +---------------------------------------------------- + +[ + ["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"], + ["operator", "="], ["operator", "%"], ["operator", "||"], + ["operator", "!="], + ["operator", "<"], ["operator", "<="], ["operator", "<>"], + ["operator", ">"], ["operator", ">="], + ["operator", "AND"], + ["operator", "ANY"], + ["operator", "ARRAY"], + ["operator", "BETWEEN"], + ["operator", "CASE"], + ["operator", "ELSE"], + ["operator", "END"], + ["operator", "EVERY"], + ["operator", "EXISTS"], + ["operator", "FIRST"], + ["operator", "IN"], + ["operator", "LIKE"], + ["operator", "NOT"], + ["operator", "OR"], + ["operator", "THEN"], + ["operator", "VALUED"], + ["operator", "WHEN"], + ["operator", "WITHIN"] +] + +---------------------------------------------------- + +Checks for all operators. \ No newline at end of file diff --git a/tests/languages/n1ql/parameter_feature.test b/tests/languages/n1ql/parameter_feature.test new file mode 100644 index 0000000000..11e17edeb2 --- /dev/null +++ b/tests/languages/n1ql/parameter_feature.test @@ -0,0 +1,13 @@ +$1 +$named_parameter + +---------------------------------------------------- + +[ + ["parameter", "$1"], + ["parameter", "$named_parameter"] +] + +---------------------------------------------------- + +Checks for parameters. diff --git a/tests/languages/n1ql/string_feature.test b/tests/languages/n1ql/string_feature.test new file mode 100644 index 0000000000..3dfeb990a9 --- /dev/null +++ b/tests/languages/n1ql/string_feature.test @@ -0,0 +1,27 @@ +"" +"fo\"obar" +"foo +bar" +'' +'fo\'obar' +'foo +bar' +'foo''s bar' +"foo's ""bar""" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"fo\\\"obar\""], + ["string", "\"foo\r\nbar\""], + ["string", "''"], + ["string", "'fo\\'obar'"], + ["string", "'foo\r\nbar'"], + ["string", "'foo''s bar'"], + ["string", "\"foo's \"\"bar\"\"\""] +] + +---------------------------------------------------- + +Checks for strings.