1 parent
e2e90f8618
commit
17718732cc
525 files changed
+3631
-381
No files matched your search
+1
@@ -0,0 +1 @@
|
||||
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/behaviour/cstyle","ace/mode/matching_brace_outdent"],function(e,t,n){var r=e("../lib/oop"),o=e("./text").Mode,i=e("./logiql_highlight_rules").LogiQLHighlightRules,s=e("./folding/coffee").FoldMode,a=e("../token_iterator").TokenIterator,u=e("../range").Range,c=e("./behaviour/cstyle").CstyleBehaviour,l=e("./matching_brace_outdent").MatchingBraceOutdent,d=function(){this.HighlightRules=i,this.foldingRules=new s,this.$outdent=new l,this.$behaviour=new c};r.inherits(d,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens,s=o.state;if(/comment|string/.test(s))return r;if(i.length&&"comment.single"==i[i.length-1].type)return r;var a=t.match();return/(-->|<--|<-|->|{)\s*$/.test(t)&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)?!0:"\n"!==n&&"\r\n"!==n?!1:/^\s+/.test(t)?!0:!1},this.autoOutdent=function(e,t,n){if(!this.$outdent.autoOutdent(t,n)){var r=t.getLine(n),o=r.match(/^\s+/),i=r.lastIndexOf(".")+1;if(!o||!n||!i)return 0;var s=t.getLine(n+1),a=this.getMatching(t,{row:n,column:i});if(!a||a.start.row==n)return 0;i=o[0].length;var c=this.$getIndent(t.getLine(a.start.row));t.replace(new u(n+1,0,n+1,i),c)}},this.getMatching=function(e,t,n){void 0==t&&(t=e.selection.lead),"object"==typeof t&&(n=t.column,t=t.row);var r=e.getTokenAt(t,n),o="keyword.start",i="keyword.end",s;if(r){if(r.type==o){var c=new a(e,t,n);c.step=c.stepForward}else{if(r.type!=i)return;var c=new a(e,t,n);c.step=c.stepBackward}for(;(s=c.step())&&s.type!=o&&s.type!=i;);if(s&&s.type!=r.type){var l=c.getCurrentTokenColumn(),t=c.getCurrentTokenRow();return new u(t,l,t,l+s.value.length)}}},this.$id="ace/mode/logiql"}.call(d.prototype),t.Mode=d}),ace.define("ace/mode/logiql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=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()};r.inherits(i,o),t.LogiQLHighlightRules=i}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){var r=e("../../lib/oop"),o=e("./fold_mode").FoldMode,i=e("../../range").Range,s=t.FoldMode=function(){};r.inherits(s,o),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var o=/\S/,s=e.getLine(n),a=s.search(o);if(-1!=a&&"#"==s[a]){for(var u=s.length,c=e.getLength(),l=n,d=n;++n<c;){s=e.getLine(n);var g=s.search(o);if(-1!=g){if("#"!=s[g])break;d=n}}if(d>l){var m=e.getLine(d).length;return new i(l,u,d,m)}}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),o=r.search(/\S/),i=e.getLine(n+1),s=e.getLine(n-1),a=s.search(/\S/),u=i.search(/\S/);if(-1==o)return e.foldWidgets[n-1]=-1!=a&&u>a?"start":"","";if(-1==a){if(o==u&&"#"==r[o]&&"#"==i[o])return e.foldWidgets[n-1]="",e.foldWidgets[n+1]="","start"}else if(a==o&&"#"==r[o]&&"#"==s[o]&&-1==e.getLine(n-2).search(/\S/))return e.foldWidgets[n-1]="start",e.foldWidgets[n+1]="","";return e.foldWidgets[n-1]=-1!=a&&o>a?"start":"",u>o?"staLine truncated
|
||||
Reference in new issue
Block a user