This server is intended for use for Academic Classwork related Git repositories only. Projects/repositories will generally be removed after 6 months following close of the semester. Inactive repositories from previous semester are now being archived when no activity for 365 days. They are renamed and marked as 'archived'. After 90 days in that state they will be removed from the system completely.

Commit 61afca07 authored by Jonathan Evans's avatar Jonathan Evans

fixed lambda error issue

parent cd15f2be
......@@ -395,10 +395,10 @@ N_ID_EXPR_LIST : /* epsilon */
;
N_LAMBDA_EXPR : T_LAMBDA T_LPAREN N_ID_LIST T_RPAREN N_EXPR
{
endScope();
if($5.type==FUNCTION){
yyerror("Arg 2 cannot be a function");
}
endScope();
$$.type=FUNCTION;
$$.numParams=$3.numParams;
......@@ -578,13 +578,15 @@ bool findEntryInAnyScope(const string theName)
//Should only call this if it is known that the entry is in the scopestack
SYMBOL_TABLE_ENTRY getEntryInAnyScope(const string theName){
SYMBOL_TABLE currentScope = scopeStack.top();
SYMBOL_TABLE_ENTRY target;
if(currentScope.findEntry(theName)){
return currentScope.getEntry(theName);
target = currentScope.getEntry(theName);
} else {
scopeStack.pop();
return getEntryInAnyScope(theName);
target = getEntryInAnyScope(theName);
scopeStack.push(currentScope);
}
return target;
}
void cleanUp()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment