From 8424804b1feaff5121060ed5ae4a321c47a76c34 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 21 Dec 2009 04:25:30 -0500 Subject: Differentiate between colors and vectors in the AST. --- dimension/realize.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'dimension/realize.c') diff --git a/dimension/realize.c b/dimension/realize.c index 5a13d8b..f795d0f 100644 --- a/dimension/realize.c +++ b/dimension/realize.c @@ -62,11 +62,10 @@ dmnsn_realize_vector(dmnsn_astnode astnode) static dmnsn_color dmnsn_realize_color(dmnsn_astnode astnode) { - if (astnode.type != DMNSN_AST_VECTOR) { + if (astnode.type != DMNSN_AST_COLOR) { dmnsn_error(DMNSN_SEVERITY_HIGH, "Expected a color."); } - dmnsn_astnode rnode, gnode, bnode, fnode, tnode; dmnsn_array_get(astnode.children, 0, &rnode); dmnsn_array_get(astnode.children, 1, &gnode); @@ -366,7 +365,7 @@ dmnsn_realize_pigment(dmnsn_astnode astnode, dmnsn_object *object) case DMNSN_AST_NONE: break; - case DMNSN_AST_VECTOR: + case DMNSN_AST_COLOR: color = dmnsn_realize_color(color_node); object->texture->pigment = dmnsn_new_solid_pigment(color); if (!object->texture->pigment) { -- cgit v1.2.3