summaryrefslogtreecommitdiffstats
path: root/dimension/common.rules
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-02-25 02:10:26 -0500
committerTavian Barnes <tavianator@gmail.com>2010-02-25 02:10:26 -0500
commita893d72c2caf3b8dc457115f6409b6bf66a5adbc (patch)
tree2f54bd0774cf91189be2f7afd7ae1a8fd8c9c113 /dimension/common.rules
parent21794278ae305acd5dc13d0cd6a491f420b69880 (diff)
downloaddimension-a893d72c2caf3b8dc457115f6409b6bf66a5adbc.tar.xz
Parse interiors.
Diffstat (limited to 'dimension/common.rules')
-rw-r--r--dimension/common.rules19
1 files changed, 19 insertions, 0 deletions
diff --git a/dimension/common.rules b/dimension/common.rules
index f0e8eae..7b4c609 100644
--- a/dimension/common.rules
+++ b/dimension/common.rules
@@ -153,6 +153,7 @@ OBJECT_MODIFIER: TRANSFORMATION
| PIGMENT {
$$ = dmnsn_new_astnode1(DMNSN_AST_TEXTURE, @$, $1);
}
+ | INTERIOR
;
/* Textures */
@@ -259,6 +260,24 @@ REFLECTION_ITEMS: /* empty */ {
}
;
+/* Interiores */
+INTERIOR: "interior" "{"
+ INTERIOR_ITEMS
+ "}"
+ { $$ = $3; }
+;
+
+INTERIOR_ITEMS: /* empty */ {
+ $$ = dmnsn_new_astnode(DMNSN_AST_INTERIOR, @$);
+ }
+ | INTERIOR_ITEMS "ior" FLOAT {
+ dmnsn_astnode diffuse = dmnsn_new_astnode1(DMNSN_AST_IOR,
+ @2, $3);
+ $$ = $1;
+ dmnsn_array_push($$.children, &diffuse);
+ }
+;
+
/* Floats */
FLOAT: ARITH_EXPR {