Rename the function, return and for keywords and remove the lambda keyword.

Fixes #6194
This commit is contained in:
Gunnar Beutner 2014-05-12 12:59:12 +02:00
parent a1f578f4f1
commit a5d3523b85
2 changed files with 3 additions and 20 deletions

View File

@ -229,11 +229,10 @@ where return T_WHERE;
import return T_IMPORT;
assign return T_ASSIGN;
ignore return T_IGNORE;
function return T_FUNCTION;
lambda return T_LAMBDA;
return return T_RETURN;
__function return T_FUNCTION;
__return return T_RETURN;
zone return T_ZONE;
for return T_FOR;
__for return T_FOR;
\<\< { yylval->op = &AExpression::OpShiftLeft; return T_SHIFT_LEFT; }
\>\> { yylval->op = &AExpression::OpShiftRight; return T_SHIFT_RIGHT; }
\<= { yylval->op = &AExpression::OpLessThanOrEqual; return T_LESS_THAN_OR_EQUAL; }

View File

@ -160,7 +160,6 @@ static void MakeRBinaryOp(Value** result, AExpression::OpCallback& op, Value *le
%token T_ASSIGN "assign (T_ASSIGN)"
%token T_IGNORE "ignore (T_IGNORE)"
%token T_FUNCTION "function (T_FUNCTION)"
%token T_LAMBDA "lambda (T_LAMBDA)"
%token T_RETURN "return (T_RETURN)"
%token T_ZONE "zone (T_ZONE)"
%token T_FOR "for (T_FOR)"
@ -865,21 +864,6 @@ rterm: T_STRING
$$ = new Value(make_shared<AExpression>(&AExpression::OpFunction, arr, Array::Ptr($3), DebugInfoRange(@1, @5)));
}
| T_LAMBDA identifier_items ':' rterm
{
Array::Ptr arr = make_shared<Array>();
arr->Add(Empty);
Array::Ptr arrex = make_shared<Array>();
arrex->Add(make_shared<AExpression>(&AExpression::OpSet, make_shared<AExpression>(&AExpression::OpLiteral, "__result", @4), *$4, @4));
delete $4;
AExpression::Ptr aexpr = make_shared<AExpression>(&AExpression::OpDict, arrex, true, @4);
arr->Add(aexpr);
$$ = new Value(make_shared<AExpression>(&AExpression::OpFunction, arr, Array::Ptr($2), DebugInfoRange(@1, @4)));
}
| T_FOR '(' identifier T_IN rterm ')' rterm_scope
{
Array::Ptr arr = make_shared<Array>();