diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-03-08 23:21:31 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-03-08 23:21:31 -0500 |
commit | df0f06adcddb9c40b7cfe736a1a106a874f3513e (patch) | |
tree | 5c5a83749e6d348e4086fba65308a504bf89c08c /dimension/common.rules | |
parent | 533a684f0ec4d9afa3940ba5c4f516711015ed00 (diff) | |
download | dimension-df0f06adcddb9c40b7cfe736a1a106a874f3513e.tar.xz |
Don't treat colors and vectors as different types.
This allows things like 0.5*White, where White was #defined to be a color.
POV-Ray's colors.inc almost parses now.
Diffstat (limited to 'dimension/common.rules')
-rw-r--r-- | dimension/common.rules | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/dimension/common.rules b/dimension/common.rules index cc7411f..72480c0 100644 --- a/dimension/common.rules +++ b/dimension/common.rules @@ -403,11 +403,9 @@ ARITH_EXPR: FLOAT_LITERAL COLOR: COLOR_BODY { $$ = $1; - $$.type = DMNSN_AST_COLOR; } | "color" COLOR_BODY { $$ = $2; - $$.type = DMNSN_AST_COLOR; } ; @@ -477,7 +475,7 @@ COLOR_KEYWORD_ITEM: "identifier" { "Unbound identifier '%s'", $1); free($1); YYERROR; - } else if (symbol->type != DMNSN_AST_COLOR) { + } else { dmnsn_astnode eval = dmnsn_eval_vector(*symbol, symtable); if (eval.type == DMNSN_AST_NONE) { free($1); @@ -486,8 +484,6 @@ COLOR_KEYWORD_ITEM: "identifier" { dmnsn_copy_children($<astnode>0, eval); dmnsn_delete_astnode(eval); - } else { - dmnsn_copy_children($<astnode>0, *symbol); } free($1); |