mode-logiql-9eaea479.js 6.0 KB

123
  1. import{g as M}from"./index-15e3682d.js";function T(y,L){for(var o=0;o<L.length;o++){const f=L[o];if(typeof f!="string"&&!Array.isArray(f)){for(const k in f)if(k!=="default"&&!(k in y)){const p=Object.getOwnPropertyDescriptor(f,k);p&&Object.defineProperty(y,k,p.get?p:{enumerable:!0,get:()=>f[k]})}}}return Object.freeze(Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}))}var b={exports:{}};(function(y,L){ace.define("ace/mode/logiql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(o,f,k){var p=o("../lib/oop"),v=o("./text_highlight_rules").TextHighlightRules,l=function(){this.$rules={start:[{token:"comment.block",regex:"/\\*",push:[{token:"comment.block",regex:"\\*/",next:"pop"},{defaultToken:"comment.block"}]},{token:"comment.single",regex:"//.*"},{token:"constant.numeric",regex:"\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?[fd]?"},{token:"string",regex:'"',push:[{token:"string",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"constant.language",regex:"\\b(true|false)\\b"},{token:"entity.name.type.logicblox",regex:"`[a-zA-Z_:]+(\\d|\\a)*\\b"},{token:"keyword.start",regex:"->",comment:"Constraint"},{token:"keyword.start",regex:"-->",comment:"Level 1 Constraint"},{token:"keyword.start",regex:"<-",comment:"Rule"},{token:"keyword.start",regex:"<--",comment:"Level 1 Rule"},{token:"keyword.end",regex:"\\.",comment:"Terminator"},{token:"keyword.other",regex:"!",comment:"Negation"},{token:"keyword.other",regex:",",comment:"Conjunction"},{token:"keyword.other",regex:";",comment:"Disjunction"},{token:"keyword.operator",regex:"<=|>=|!=|<|>",comment:"Equality"},{token:"keyword.other",regex:"@",comment:"Equality"},{token:"keyword.operator",regex:"\\+|-|\\*|/",comment:"Arithmetic operations"},{token:"keyword",regex:"::",comment:"Colon colon"},{token:"support.function",regex:"\\b(agg\\s*<<)",push:[{include:"$self"},{token:"support.function",regex:">>",next:"pop"}]},{token:"storage.modifier",regex:"\\b(lang:[\\w:]*)"},{token:["storage.type","text"],regex:"(export|sealed|clauses|block|alias|alias_all)(\\s*\\()(?=`)"},{token:"entity.name",regex:"[a-zA-Z_][a-zA-Z_0-9:]*(@prev|@init|@final)?(?=(\\(|\\[))"},{token:"variable.parameter",regex:"([a-zA-Z][a-zA-Z_0-9]*|_)\\s*(?=(,|\\.|<-|->|\\)|\\]|=))"}]},this.normalizeRules()};p.inherits(l,v),f.LogiQLHighlightRules=l}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(o,f,k){var p=o("../../lib/oop"),v=o("./fold_mode").FoldMode,l=o("../../range").Range,h=f.FoldMode=function(){};p.inherits(h,v),function(){this.getFoldWidgetRange=function(a,x,t){var c=this.indentationBlock(a,t);if(c)return c;var r=/\S/,n=a.getLine(t),e=n.search(r);if(!(e==-1||n[e]!="#")){for(var i=n.length,d=a.getLength(),u=t,g=t;++t<d;){n=a.getLine(t);var s=n.search(r);if(s!=-1){if(n[s]!="#")break;g=t}}if(g>u){var _=a.getLine(g).length;return new l(u,i,g,_)}}},this.getFoldWidget=function(a,x,t){var c=a.getLine(t),r=c.search(/\S/),n=a.getLine(t+1),e=a.getLine(t-1),i=e.search(/\S/),d=n.search(/\S/);if(r==-1)return a.foldWidgets[t-1]=i!=-1&&i<d?"start":"","";if(i==-1){if(r==d&&c[r]=="#"&&n[r]=="#")return a.foldWidgets[t-1]="",a.foldWidgets[t+1]="","start"}else if(i==r&&c[r]=="#"&&e[r]=="#"&&a.getLine(t-2).search(/\S/)==-1)return a.foldWidgets[t-1]="start",a.foldWidgets[t+1]="","";return i!=-1&&i<r?a.foldWidgets[t-1]="start":a.foldWidgets[t-1]="",r<d?"start":""}}.call(h.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(o,f,k){var p=o("../range").Range,v=function(){};(function(){this.checkOutdent=function(l,h){return/^\s+$/.test(l)?/^\s*\}/.test(h):!1},this.autoOutdent=function(l,h){var a=l.getLine(h),x=a.match(/^(\s*\})/);if(!x)return 0;var t=x[1].length,c=l.findMatchingBracket({row:h,column:t});if(!c||c.row==h)return 0;var r=this.$getIndent(l.getLine(c.row));l.replace(new p(h,0,h,t-1),r)},this.$getIndent=function(l){return l.match(/^\s*/)[0]}}).call(v.prototype),f.MatchingBraceOutdent=v}),ace.define("ace/mode/logiql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/logiql_highlight_rules","ace/mode/folding/coffee","ace/token_iterator","ace/range","ace/mode/matching_brace_outdent"],function(o,f,k){var p=o("../lib/oop"),v=o("./text").Mode,l=o("./logiql_highlight_rules").LogiQLHighlightRules,h=o("./folding/coffee").FoldMode,a=o("../token_iterator").TokenIterator,x=o("../range").Range,t=o("./matching_brace_outdent").MatchingBraceOutdent,c=function(){this.HighlightRules=l,this.foldingRules=new h,this.$outdent=new t,this.$behaviour=this.$defaultBehaviour};p.inherits(c,v),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(r,n,e){var i=this.$getIndent(n),d=this.getTokenizer().getLineTokens(n,r),u=d.tokens,g=d.state;return/comment|string/.test(g)||u.length&&u[u.length-1].type=="comment.single"||(n.match(),/(-->|<--|<-|->|{)\s*$/.test(n)&&(i+=e)),i},this.checkOutdent=function(r,n,e){return this.$outdent.checkOutdent(n,e)?!0:!(e!==`
  2. `&&e!==`\r
  3. `||!/^\s+/.test(n))},this.autoOutdent=function(r,n,e){if(!this.$outdent.autoOutdent(n,e)){var i=n.getLine(e),d=i.match(/^\s+/),u=i.lastIndexOf(".")+1;if(!d||!e||!u)return 0;n.getLine(e+1);var g=this.getMatching(n,{row:e,column:u});if(!g||g.start.row==e)return 0;u=d[0].length;var s=this.$getIndent(n.getLine(g.start.row));n.replace(new x(e+1,0,e+1,u),s)}},this.getMatching=function(r,m,e){m==null&&(m=r.selection.lead),typeof m=="object"&&(e=m.column,m=m.row);var i=r.getTokenAt(m,e),d="keyword.start",u="keyword.end",g;if(i){if(i.type==d){var s=new a(r,m,e);s.step=s.stepForward}else if(i.type==u){var s=new a(r,m,e);s.step=s.stepBackward}else return;for(;(g=s.step())&&!(g.type==d||g.type==u););if(!(!g||g.type==i.type)){var _=s.getCurrentTokenColumn(),m=s.getCurrentTokenRow();return new x(m,_,m,_+g.value.length)}}},this.$id="ace/mode/logiql"}.call(c.prototype),f.Mode=c}),function(){ace.require(["ace/mode/logiql"],function(o){y&&(y.exports=o)})}()})(b);var R=b.exports;const O=M(R),w=T({__proto__:null,default:O},[R]);export{w as m};