diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-04-18 17:42:48 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-04-18 17:42:48 -0400 |
commit | 6437ab96674accfb5d5d85066e58d20887c926d7 (patch) | |
tree | 8a0b3e48db23f9dd4b851410e054d56319b63be3 /dimension | |
parent | cafde402d15049e71eaa3f19e9fee58aa1b7c580 (diff) | |
download | dimension-6437ab96674accfb5d5d85066e58d20887c926d7.tar.xz |
Support objects in object{} blocks.
Diffstat (limited to 'dimension')
-rw-r--r-- | dimension/common.rules | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/dimension/common.rules b/dimension/common.rules index a50d800..cba3669 100644 --- a/dimension/common.rules +++ b/dimension/common.rules @@ -176,6 +176,28 @@ OBJECT: FINITE_SOLID_OBJECT } } } + | "object" "{" + OBJECT + OBJECT_MODIFIERS + "}" + { + $$ = $3; + + dmnsn_astnode modifiers; + dmnsn_array_get($$.children, + dmnsn_array_size($$.children) - 1, + &modifiers); + + unsigned int i; + for (i = 0; i < dmnsn_array_size($4.children); ++i) { + dmnsn_astnode astnode; + dmnsn_array_get($4.children, i, &astnode); + ++*astnode.refcount; + dmnsn_array_push(modifiers.children, &astnode); + } + + dmnsn_delete_astnode($4); + } ; FINITE_SOLID_OBJECT: BOX |