const_fetch node

This commit is contained in:
z7zmey
2017-12-16 23:07:21 +02:00
parent 2703c00374
commit 52638e6654
3 changed files with 31 additions and 2 deletions

View File

@@ -4506,7 +4506,7 @@ yydefault:
yyDollar = yyS[yypt-1 : yypt+1]
//line parser/parser.y:981
{
yyVAL.node = node.NewSimpleNode("Const").Append(yyDollar[1].node)
yyVAL.node = expr.NewConstFetch(yyDollar[1].node)
}
case 412:
yyDollar = yyS[yypt-3 : yypt+1]

View File

@@ -978,7 +978,7 @@ scalar:
;
constant:
name { $$ = node.NewSimpleNode("Const").Append($1) }
name { $$ = expr.NewConstFetch($1) }
| class_name T_PAAMAYIM_NEKUDOTAYIM identifier { $$ = expr.NewClassConstFetch($1, $3) }
| variable_class_name T_PAAMAYIM_NEKUDOTAYIM identifier
{ $$ = expr.NewClassConstFetch($1, $3) }