MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / suffixedexp

Function suffixedexp

src/Chain/libraries/glua/lparser.cpp:923–960  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

921
922
923static void suffixedexp(LexState *ls, expdesc *v) {
924 /* suffixedexp ->
925 primaryexp { '.' NAME | '[' exp ']' | ':' NAME funcargs | funcargs } */
926 FuncState *fs = ls->fs;
927 int line = ls->linenumber;
928 primaryexp(ls, v);
929 if (ls->L->force_stopping)
930 return;
931 for (;;) {
932 switch (ls->t.token) {
933 case '.': { /* fieldsel */
934 fieldsel(ls, v);
935 break;
936 }
937 case '[': { /* '[' exp1 ']' */
938 expdesc key;
939 luaK_exp2anyregup(fs, v);
940 yindex(ls, &key);
941 luaK_indexed(fs, v, &key);
942 break;
943 }
944 case ':': { /* ':' NAME funcargs */
945 expdesc key;
946 luaX_next(ls);
947 checkname(ls, &key);
948 luaK_self(fs, v, &key);
949 funcargs(ls, v, line);
950 break;
951 }
952 case '(': case TK_STRING: case '{': { /* funcargs */
953 luaK_exp2nextreg(fs, v);
954 funcargs(ls, v, line);
955 break;
956 }
957 default: return;
958 }
959 }
960}
961
962
963static void simpleexp(LexState *ls, expdesc *v) {

Callers 3

simpleexpFunction · 0.85
assignmentFunction · 0.85
exprstatFunction · 0.85

Calls 10

primaryexpFunction · 0.85
fieldselFunction · 0.85
luaK_exp2anyregupFunction · 0.85
yindexFunction · 0.85
luaK_indexedFunction · 0.85
luaX_nextFunction · 0.85
checknameFunction · 0.85
luaK_selfFunction · 0.85
funcargsFunction · 0.85
luaK_exp2nextregFunction · 0.85

Tested by

no test coverage detected