From 2e6fe30d617e367600a57b1d1abf41117c0f8b07 Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Thu, 30 Oct 2014 02:57:39 +0100 Subject: [PATCH] Rez: implement "type 'XXXX' as 'YYYY'" directive --- Rez/RezParser.yy | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Rez/RezParser.yy b/Rez/RezParser.yy index 67fe8ad5b0..e1aca1e5bd 100644 --- a/Rez/RezParser.yy +++ b/Rez/RezParser.yy @@ -186,7 +186,11 @@ type_definition : "type" type_spec "{" field_definitions "}" { world.fieldLists.pop(); if(world.verboseFlag) std::cout << "TYPE " << $2 << std::endl; } | "type" type_spec "as" type_spec - { if(world.verboseFlag) std::cout << "TYPE " << $2 << std::endl; } + { + if(world.verboseFlag) std::cout << "TYPE " << $2 << std::endl; + auto spec = $4; + world.addTypeDefinition($2, world.getTypeDefinition(spec.getType(), spec.getID(), @4)); + } ; %type res_type;