lisp.min.js 1.2 KB

12345678910111213141516
  1. /*! `lisp` grammar compiled for Highlight.js 11.7.0 */
  2. var hljsGrammar=(()=>{"use strict";return e=>{
  3. const n="[a-zA-Z_\\-+\\*\\/<=>&#][a-zA-Z0-9_\\-+*\\/<=>&#!]*",a="\\|[^]*?\\|",i="(-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|-)?\\d+)?",s={
  4. className:"literal",begin:"\\b(t{1}|nil)\\b"},l={className:"number",variants:[{
  5. begin:i,relevance:0},{begin:"#(b|B)[0-1]+(/[0-1]+)?"},{
  6. begin:"#(o|O)[0-7]+(/[0-7]+)?"},{begin:"#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?"},{
  7. begin:"#(c|C)\\("+i+" +"+i,end:"\\)"}]},r=e.inherit(e.QUOTE_STRING_MODE,{
  8. illegal:null}),b=e.COMMENT(";","$",{relevance:0}),t={begin:"\\*",end:"\\*"},g={
  9. className:"symbol",begin:"[:&]"+n},c={begin:n,relevance:0},d={begin:a},m={
  10. contains:[l,r,t,g,{begin:"\\(",end:"\\)",contains:["self",s,r,l,c]},c],
  11. variants:[{begin:"['`]\\(",end:"\\)"},{begin:"\\(quote ",end:"\\)",keywords:{
  12. name:"quote"}},{begin:"'"+a}]},o={variants:[{begin:"'"+n},{
  13. begin:"#'"+n+"(::"+n+")*"}]},v={begin:"\\(\\s*",end:"\\)"},u={endsWithParent:!0,
  14. relevance:0};return v.contains=[{className:"name",variants:[{begin:n,relevance:0
  15. },{begin:a}]},u],u.contains=[m,o,v,s,l,r,b,t,g,d,c],{name:"Lisp",illegal:/\S/,
  16. contains:[l,e.SHEBANG(),s,r,b,m,o,v,c]}}})();export default hljsGrammar;