MCPcopy
hub / github.com/nwutils/nw-sample-apps / expression

Function expression

mini-code-edit/cm/mode/rust/rust.js:192–204  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

190 return pass();
191 }
192 function expression(type) {
193 if (type == "atom" || type == "name") return cont(maybeop);
194 if (type == "{") return cont(pushlex("}"), exprbrace, poplex);
195 if (type.match(/[\[\(]/)) return matchBrackets(type, expression);
196 if (type.match(/[\]\)\};,]/)) return pass();
197 if (type == "if-style") return cont(expression, expression);
198 if (type == "else-style" || type == "op") return cont(expression);
199 if (type == "for") return cont(pattern, maybetype, inop, expression, expression);
200 if (type == "alt") return cont(expression, altbody);
201 if (type == "fn") return cont(fndef);
202 if (type == "macro") return cont(macro);
203 return cont();
204 }
205 function maybeop(type) {
206 if (content == ".") return cont(maybeprop);
207 if (content == "::<"){return cont(typarams, maybeop);}

Callers

nothing calls this directly

Calls 4

contFunction · 0.70
pushlexFunction · 0.70
matchBracketsFunction · 0.70
passFunction · 0.70

Tested by

no test coverage detected