MCPcopy Create free account
hub / github.com/WheretIB/nullc / ParseFunctionArguments

Function ParseFunctionArguments

NULLC/Parser.cpp:876–893  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

874}
875
876unsigned int ParseFunctionArguments(Lexeme** str)
877{
878 unsigned callArgCount = 0;
879 unsigned lastArgument = SetCurrentArgument(callArgCount);
880 if(ParseVaribleSet(str))
881 {
882 callArgCount++;
883 while(ParseLexem(str, lex_comma))
884 {
885 SetCurrentArgument(callArgCount);
886 if(!ParseVaribleSet(str))
887 ThrowError((*str)->pos, "ERROR: expression not found after ',' in function parameter list");
888 callArgCount++;
889 }
890 }
891 SetCurrentArgument(lastArgument);
892 return callArgCount;
893}
894
895bool ParseFunctionCall(Lexeme** str, bool memberFunctionCall)
896{

Callers 3

ParseFunctionCallFunction · 0.85
ParsePostExpressionFunction · 0.85
ParseTerminalFunction · 0.85

Calls 4

SetCurrentArgumentFunction · 0.85
ParseVaribleSetFunction · 0.85
ParseLexemFunction · 0.85
ThrowErrorFunction · 0.85

Tested by

no test coverage detected