MCPcopy Create free account
hub / github.com/ChinaSiro/claude-code-sourcemap / p3z

Function p3z

package/cli.js:1612–1612  ·  view source on GitHub ↗
(q,K)

Source from the content-addressed store, hash-verified

1610`)break;if(A===0){if(j==="}")break;if(_&&j==="/")break}if(j==="\\"&&q.L.i+1<q.L.len){J8(q.L),J8(q.L);continue}let H=u8(q.L,1);if(j==="$"){if(H==="{"||H==="("||H==="["){O();let J=Sr(q);if(J)Y.push(J);$=q.L.b;continue}if(H==="'"){O();let J=q.L.b;J8(q.L),J8(q.L);while(q.L.i<q.L.len&&u8(q.L)!=="'"){if(u8(q.L)==="\\"&&q.L.i+1<q.L.len)J8(q.L);J8(q.L)}if(u8(q.L)==="'")J8(q.L);Y.push(h8(q,"ansi_c_string",J,q.L.b,[])),$=q.L.b;continue}if(cv(H)||xj(H)||vV6.has(H)){O();let J=Sr(q);if(J)Y.push(J);$=q.L.b;continue}}if(j==='"'){O(),Y.push(hr(q)),$=q.L.b;continue}if(j==="'"){O();let J=q.L.b;J8(q.L);while(q.L.i<q.L.len&&u8(q.L)!=="'")J8(q.L);if(u8(q.L)==="'")J8(q.L);Y.push(h8(q,"raw_string",J,q.L.b,[])),$=q.L.b;continue}if((j==="<"||j===">")&&H==="("){O();let J=Wm1(q);if(J)Y.push(J);$=q.L.b;continue}if(j==="`"){O();let J=Dm1(q);if(J)Y.push(J);$=q.L.b;continue}if(j==="{")A++;else if(j==="}"&&A>0)A--;J8(q.L)}O();while(u8(q.L)===`
1611`)J8(q.L);if(Y.length>1&&Y[0].type==="word"&&/^[ \t]+$/.test(Y[0].text))Y.shift();if(Y.length===0)return null;if(Y.length===1)return Y[0];let w=Y[Y.length-1];return h8(q,"concatenation",Y[0].startIndex,w.endIndex,Y)}function m3z(q){let K=[],_=q.L.b,z=()=>{if(q.L.b>_)K.push(h8(q,"regex",_,q.L.b,[]))};while(q.L.i<q.L.len){let Y=u8(q.L);if(Y==="}"||Y===`
1612`)break;if(Y==="\\"&&q.L.i+1<q.L.len){J8(q.L),J8(q.L);continue}if(Y==='"'){z(),K.push(hr(q)),_=q.L.b;continue}if(Y==="'"){z();let $=q.L.b;J8(q.L);while(q.L.i<q.L.len&&u8(q.L)!=="'")J8(q.L);if(u8(q.L)==="'")J8(q.L);K.push(h8(q,"raw_string",$,q.L.b,[])),_=q.L.b;continue}if(Y==="$"){let $=u8(q.L,1);if($==="{"){let A=1;J8(q.L),J8(q.L);while(q.L.i<q.L.len&&A>0){let O=u8(q.L);if(O==="{")A++;else if(O==="}")A--;J8(q.L)}continue}if($==="("){let A=1;J8(q.L),J8(q.L);while(q.L.i<q.L.len&&A>0){let O=u8(q.L);if(O==="(")A++;else if(O===")")A--;J8(q.L)}continue}}J8(q.L)}z();while(u8(q.L)===`
1613`)J8(q.L);return K}function Dm1(q){let K=q.L.b;J8(q.L);let _=h8(q,"`",K,q.L.b,[]);q.inBacktick++;let z=[];while(!0){if(mq(q.L),u8(q.L)==="`"||u8(q.L)==="")break;let $=BY(q.L),A=u9(q.L,"cmd");if(A.type==="EOF"||A.type==="BACKTICK"){r5(q.L,$);break}if(A.type==="NEWLINE")continue;r5(q.L,$);let O=UV4(q);if(!O)break;if(z.push(O),mq(q.L),u8(q.L)==="`")break;let w=BY(q.L),j=u9(q.L,"cmd");if(j.type==="OP"&&(j.value===";"||j.value==="&"))z.push(i5(q,j.value,j));else if(j.type!=="NEWLINE")r5(q.L,w)}q.inBacktick--;let Y;if(u8(q.L)==="`"){let $=q.L.b;J8(q.L),Y=h8(q,"`",$,q.L.b,[])}else Y=h8(q,"`",q.L.b,q.L.b,[]);if(z.length===0)return null;return h8(q,"command_substitution",K,Y.endIndex,[_,...z,Y])}function p3z(q,K){let _=i5(q,"if",K),z=[_],Y=Qv(q,null);z.push(...Y),zo6(q,"then",z);let $=Qv(q,null);z.push(...$);while(!0){let O=BY(q.L),w=u9(q.L,"cmd");if(w.type==="WORD"&&w.value==="elif"){let j=i5(q,"elif",w),H=Qv(q,null),J=[j,...H];zo6(q,"then",J);let M=Qv(q,null);J.push(...M);let X=J[J.length-1];z.push(h8(q,"elif_clause",j.startIndex,X.endIndex,J))}else if(w.type==="WORD"&&w.value==="else"){let j=i5(q,"else",w),H=Qv(q,null),J=H.length>0?H[H.length-1]:j;z.push(h8(q,"else_clause",j.startIndex,J.endIndex,[j,...H]))}else{r5(q.L,O);break}}zo6(q,"fi",z);let A=z[z.length-1];return h8(q,"if_statement",_.startIndex,A.endIndex,z)}function B3z(q,K){let _=i5(q,K.value,K),z=[_],Y=Qv(q,null);z.push(...Y);let $=jm1(q);if($)z.push($);let A=z[z.length-1];return h8(q,"while_statement",_.startIndex,A.endIndex,z)}function xV4(q,K){let _=i5(q,K.value,K);if(mq(q.L),K.value==="for"&&u8(q.L)==="("&&u8(q.L,1)==="("){let J=q.L.b;J8(q.L),J8(q.L);let M=h8(q,"((",J,q.L.b,[]),X=[_,M];for(let G=0;G<3;G++){mq(q.L);let Z=Yo6(q,G<2?";":"))","assign");if(X.push(...Z),G<2){if(u8(q.L)===";"){let T=q.L.b;J8(q.L),X.push(h8(q,";",T,q.L.b,[]))}}}if(mq(q.L),u8(q.L)===")"&&u8(q.L,1)===")"){let G=q.L.b;J8(q.L),J8(q.L),X.push(h8(q,"))",G,q.L.b,[]))}let P=BY(q.L),W=u9(q.L,"cmd");if(W.type==="OP"&&W.value===";")X.push(i5(q,";",W));else if(W.type!=="NEWLINE")r5(q.L,P);let D=jm1(q);if(D)X.push(D);else if(Rr(q),mq(q.L),u8(q.L)==="{"){let G=q.L.b;J8(q.L);let Z=h8(q,"{",G,q.L.b,[]),T=Qv(q,"}"),v;if(u8(q.L)==="}"){let V=q.L.b;J8(q.L),v=h8(q,"}",V,q.L.b,[])}else v=h8(q,"}",q.L.b,q.L.b,[]);X.push(h8(q,"compound_statement",Z.startIndex,v.endIndex,[Z,...T,v]))}let f=X[X.length-1];return h8(q,"c_style_for_statement",_.startIndex,f.endIndex,X)}let z=[_],Y=u9(q.L,"arg");z.push(h8(q,"variable_name",Y.start,Y.end,[])),mq(q.L);let $=BY(q.L),A=u9(q.L,"arg");if(A.type==="WORD"&&A.value==="in"){z.push(i5(q,"in",A));while(!0){mq(q.L);let J=u8(q.L);if(J===";"||J===`
1614`||J==="")break;let M=dv(q,"arg");if(!M)break;z.push(M)}}else r5(q.L,$);let O=BY(q.L),w=u9(q.L,"cmd");if(w.type==="OP"&&w.value===";")z.push(i5(q,";",w));else if(w.type!=="NEWLINE")r5(q.L,O);let j=jm1(q);if(j)z.push(j);let H=z[z.length-1];return h8(q,"for_statement",_.startIndex,H.endIndex,z)}function jm1(q){Rr(q);let K=BY(q.L),_=u9(q.L,"cmd");if(_.type!=="WORD"||_.value!=="do")return r5(q.L,K),null;let z=i5(q,"do",_),Y=Qv(q,null),$=[z,...Y];zo6(q,"done",$);let A=$[$.length-1];return h8(q,"do_group",z.startIndex,A.endIndex,$)}function g3z(q,K){let _=i5(q,"case",K),z=[_];mq(q.L);let Y=dv(q,"arg");if(Y)z.push(Y);mq(q.L),zo6(q,"in",z),Rr(q);while(!0){mq(q.L),Rr(q);let A=BY(q.L),O=u9(q.L,"arg");if(O.type==="WORD"&&O.value==="esac"){z.push(i5(q,"esac",O));break}if(O.type==="EOF")break;r5(q.L,A);let w=F3z(q);if(!w)break;z.push(w)}let $=z[z.length-1];return h8(q,"case_statement",_.startIndex,$.endIndex,z)}function F3z(q){mq(q.L);let K=q.L.b,_=[];if(u8(q.L)==="("){let w=q.L.b;J8(q.L),_.push(h8(q,"(",w,q.L.b,[]))}let z=!0;while(!0){mq(q.L);let w=u8(q.L);if(w===")"||w==="")break;let j=U3z(q);if(j.length===0)break;if(!z&&j.length>1){let H=j.map((X)=>X.type==="extglob_pattern"?h8(q,"word",X.startIndex,X.endIndex,[]):X),J=H[0],M=H[H.length-1];_.push(h8(q,"concatenation",J.startIndex,M.endIndex,H))}else _.push(...j);if(z=!1,mq(q.L),u8(q.L)==="\\"&&u8(q.L,1)===`
1615`)J8(q.L),J8(q.L),mq(q.L);if(u8(q.L)==="|"){let H=q.L.b;if(J8(q.L),_.push(h8(q,"|",H,q.L.b,[])),u8(q.L)==="\\"&&u8(q.L,1)===`

Callers 1

Hq6Function · 0.85

Calls 8

i5Function · 0.85
QvFunction · 0.85
zo6Function · 0.85
BYFunction · 0.85
u9Function · 0.85
h8Function · 0.85
r5Function · 0.85
pushMethod · 0.45

Tested by

no test coverage detected