You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
1.7 KiB
1 line
1.7 KiB
"use strict";(self.webpackChunkjupyter_web=self.webpackChunkjupyter_web||[]).push([[6407],{6407:(g,o,l)=>{function f(n){for(var e={},i=n.split(" "),r=0;r<i.length;++r)e[i[r]]=!0;return e}l.r(o),l.d(o,{sieve:()=>a});var k=f("if elsif else stop require"),d=f("true false not");function t(n,e){var i=n.next();if("/"==i&&n.eat("*"))return e.tokenize=p,p(n,e);if("#"===i)return n.skipToEnd(),"comment";if('"'==i)return e.tokenize=function h(n){return function(e,i){for(var u,r=!1;null!=(u=e.next())&&(u!=n||r);)r=!r&&"\\"==u;return r||(i.tokenize=t),"string"}}(i),e.tokenize(n,e);if("("==i)return e._indent.push("("),e._indent.push("{"),null;if("{"===i)return e._indent.push("{"),null;if(")"==i&&(e._indent.pop(),e._indent.pop()),"}"===i)return e._indent.pop(),null;if(","==i||";"==i||/[{}\(\),;]/.test(i))return null;if(/\d/.test(i))return n.eatWhile(/[\d]/),n.eat(/[KkMmGg]/),"number";if(":"==i)return n.eatWhile(/[a-zA-Z_]/),n.eatWhile(/[a-zA-Z0-9_]/),"operator";n.eatWhile(/\w/);var r=n.current();return"text"==r&&n.eat(":")?(e.tokenize=c,"string"):k.propertyIsEnumerable(r)?"keyword":d.propertyIsEnumerable(r)?"atom":null}function c(n,e){return e._multiLineString=!0,n.sol()?("."==n.next()&&n.eol()&&(e._multiLineString=!1,e.tokenize=t),"string"):(n.eatSpace(),"#"==n.peek()?(n.skipToEnd(),"comment"):(n.skipToEnd(),"string"))}function p(n,e){for(var r,i=!1;null!=(r=n.next());){if(i&&"/"==r){e.tokenize=t;break}i="*"==r}return"comment"}const a={name:"sieve",startState:function(n){return{tokenize:t,baseIndent:n||0,_indent:[]}},token:function(n,e){return n.eatSpace()?null:(e.tokenize||t)(n,e)},indent:function(n,e,i){var r=n._indent.length;return e&&"}"==e[0]&&r--,r<0&&(r=0),r*i.unit},languageData:{indentOnInput:/^\s*\}$/}}}}]); |