Fix compiler bug: user functions should be able to have the same name as module function parameter names

This commit is contained in:
Eric Swanson 2020-06-15 22:26:33 -07:00 committed by GIB
parent 7a40423b7d
commit e7b0dffc4c
7 changed files with 54 additions and 5 deletions

View file

@ -1998,6 +1998,16 @@ int SmartParser::getToken( CompilerContext& ctx, Token& token, Expression* pexpr
return res;
}
/**
* Get a token, but bypass the conversions in SmartParser::getToken
* Primarily used when getting an identifier that may be the same as
* a userfunc name.
*/
int SmartParser::getTokenWithoutConversions( CompilerContext& ctx, Token& token )
{
return Parser::getToken( ctx, token );
}
bool SmartParser::callingMethod( CompilerContext& ctx )
{
// if we have something like x.foo(), change to call-method