From b98c617d72002368a6a5435afe47d03172248c42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Wed, 17 May 2000 21:30:59 +0200 Subject: [PATCH] typeof() now returns a type and not a string. Rev: src/language.yacc:1.186 --- src/language.yacc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/language.yacc b/src/language.yacc index 668abd30ab..ca606533c6 100644 --- a/src/language.yacc +++ b/src/language.yacc @@ -109,7 +109,7 @@ /* This is the grammar definition of Pike. */ #include "global.h" -RCSID("$Id: language.yacc,v 1.185 2000/05/11 14:09:45 grubba Exp $"); +RCSID("$Id: language.yacc,v 1.186 2000/05/17 19:30:59 grubba Exp $"); #ifdef HAVE_MEMORY_H #include <memory.h> #endif @@ -2442,11 +2442,10 @@ typeof: TOK_TYPEOF '(' expr0 ')' /* FIXME: Why build the node at all? */ - tmp=mknode(F_COMMA_EXPR,$3,0); + tmp=mknode(F_COMMA_EXPR, $3, 0); - s=describe_type( tmp && CAR(tmp) && CAR(tmp)->type ? CAR(tmp)->type : mixed_type_string); - $$=mkstrnode(s); - free_string(s); + s=(tmp && CAR(tmp) && CAR(tmp)->type ? CAR(tmp)->type : mixed_type_string); + $$ = mktypenode(s); free_node(tmp); } | TOK_TYPEOF '(' error ')' { $$=0; yyerrok; } -- GitLab