diff options
author | Marius Kintel <marius@kintel.net> | 2013-04-24 13:17:25 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-04-26 21:45:03 (GMT) |
commit | 9b740b558dd627412e01a3521d5372d95e294af2 (patch) | |
tree | f34ebfa719303629e27d5fe84c177b5ac38adfbe /testdata/scad/misc/variable-scope-sub.scad | |
parent | 9a297ecee57549a4eb3919bde4f7b41a548724de (diff) |
Further refactoring of scope/context mechanisms. Mostly related to the new FileContext class. Not quite there yet, but almost
Diffstat (limited to 'testdata/scad/misc/variable-scope-sub.scad')
-rw-r--r-- | testdata/scad/misc/variable-scope-sub.scad | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/testdata/scad/misc/variable-scope-sub.scad b/testdata/scad/misc/variable-scope-sub.scad new file mode 100644 index 0000000..fda9520 --- /dev/null +++ b/testdata/scad/misc/variable-scope-sub.scad @@ -0,0 +1,24 @@ +sub_global = 15; + +module submodule() { + echo($children); + echo(submodule_var); + submodule_var = 16; + module subsubmodule() { + echo($children); + subsubmodule_var = 17; + echo(subsubmodule_var); + child(0); + } + subsubmodule() {child(0); sphere();} +} + +module submodule2() { + echo(sub_global); + echo($children); +} + +module submain() { + echo(global_var); // Undefined global var + submodule() {submodule2() sphere(); cube();} +} |