print node

This commit is contained in:
z7zmey
2017-12-18 19:03:39 +02:00
parent b5dc115ff1
commit a73b9a9478
3 changed files with 31 additions and 2 deletions

View File

@@ -4215,7 +4215,7 @@ yydefault:
yyDollar = yyS[yypt-2 : yypt+1]
//line parser/parser.y:893
{
yyVAL.node = node.NewSimpleNode("Print").Append(yyDollar[2].node)
yyVAL.node = expr.NewPrint(yyDollar[2].node)
}
case 363:
yyDollar = yyS[yypt-1 : yypt+1]

View File

@@ -890,7 +890,7 @@ expr_without_variable:
| '@' expr { $$ = node.NewSimpleNode("Silence").Append($2); }
| scalar { $$ = $1; }
| '`' backticks_expr '`' { $$ = node.NewNodeExprShellExec($1, $2, $3) }
| T_PRINT expr { $$ = node.NewSimpleNode("Print").Append($2); }
| T_PRINT expr { $$ = expr.NewPrint($2) }
| T_YIELD { $$ = node.NewSimpleNode("Yield"); }
| T_YIELD expr { $$ = node.NewSimpleNode("Yield").Append($2); }
| T_YIELD expr T_DOUBLE_ARROW expr { $$ = node.NewSimpleNode("Yield").Append($2).Append($4); }