MCPcopy Create free account
hub / github.com/PlutoLang/Pluto / suffixedexp

Function suffixedexp

src/lparser.cpp:3770–3786  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3768
3769
3770static void suffixedexp (LexState *ls, expdesc *v, int flags = 0, tdn_t *nprop = nullptr, TypeHint *prop = nullptr) {
3771 /* suffixedexp ->
3772 primaryexp { '.' NAME | '[' exp ']' | ':' NAME funcargs | funcargs } */
3773 int line = ls->getLineNumber();
3774 if (l_unlikely(ispostfixplusplus(ls))) {
3775 postfixplusplus(ls, v, line, flags);
3776 return;
3777 }
3778 primaryexp(ls, v, flags);
3779 if (prop) {
3780 if (v->k == VINDEXUP) {
3781 TValue *key = &ls->fs->f->k[v->u.ind.idx];
3782 prop->merge(get_global_prop(ls, tsvalue(key)));
3783 }
3784 }
3785 expsuffix(ls, v, line, flags, nprop, prop);
3786}
3787
3788static void expsuffix (LexState *ls, expdesc *v, int line, int flags, tdn_t *nprop, TypeHint *prop) {
3789 FuncState *fs = ls->fs;

Callers 3

simpleexpFunction · 0.85
restassignFunction · 0.85
exprstatFunction · 0.85

Calls 6

ispostfixplusplusFunction · 0.85
postfixplusplusFunction · 0.85
primaryexpFunction · 0.85
expsuffixFunction · 0.85
getLineNumberMethod · 0.80
mergeMethod · 0.80

Tested by

no test coverage detected