Commit Graph

31 Commits (dcb0b53d1155acfcdf5a9821dc8f21a1f5867c75)

Author SHA1 Message Date
Torsten Paul 7f36599073 Integrate feature registry with modules.
In case a module is attached to a disabled feature, the module lookup
will give a warning message and ignore that (builtin) module.
2014-01-02 23:28:02 +01:00
Łukasz Stelmach 400d28d753 Enable module stack introspection from within an SCAD script
The _current_module and _parent_module variables have been replaced
by a built-in function parent_module(n). It takes one numeric parameter n,
and returns n-th element from the module stack. If no argument provided,
n defaults to 1 and the function returns the name of the direct parent
module. If n is equal 0 current module name is returned.
2013-08-18 17:19:49 +02:00
Łukasz Stelmach d67e012916 Introduce '_current_module' and '_parent_module' variables
Add two built-in variables that provide access to the names
of the current and the previously instantiated modules.

Having these variables simplifies generation of BOMs and assembly
graphs (e.g. with GraphViz).

[std::stack]
2013-08-17 16:22:00 +02:00
Marius Kintel a0a49b0bc9 Merge remote-tracking branch 'origin/issue181' into epec-kernel
Conflicts:
	src/MainWindow.h
	src/ModuleCache.cc
	src/mainwin.cc
	src/module.cc
	src/module.h
	src/parsersettings.cc
	testdata/modulecache-tests/cascade.sh
	testdata/modulecache-tests/cascade2.sh
2013-06-18 02:16:20 -04:00
Marius Kintel bd0248e109 Fixed a bug where changing a file during a large automatic reload could cause a crash 2013-06-13 01:16:26 -04:00
Marius Kintel 626047f26d Minor refactoring of include checks 2013-06-05 22:25:58 -04:00
Marius Kintel 85c83fbc04 Merge branch 'master' into issue181 2013-06-02 18:15:37 -04:00
Marius Kintel e4197c1b58 Dump the else part of if-else blocks if it has any content. Part of #384 2013-06-01 16:05:09 -04:00
Marius Kintel 5722dd9e41 Minor refactoring, no longer automatically reloads if a dependency disappears 2013-05-28 16:29:53 -04:00
Marius Kintel cc6ac10e47 Search paths when looking for previously missing includes. Should provide most of what's needed for #364 2013-05-25 17:45:13 -04:00
Don Bright 8a83e334ab try to refactor the 'is_modified( includefile )' code 2013-05-19 23:31:18 -05:00
Marius Kintel ee6f149dd0 bugfix: Fixed recursion crash (#346) 2013-05-13 16:27:17 -04:00
Marius Kintel ba20c0e800 Modified parse to allow overloading of variables in local blocks. Also did some minor cleanups while at it. Test cases missing 2013-04-26 18:32:19 -04:00
Marius Kintel 9b740b558d Further refactoring of scope/context mechanisms. Mostly related to the new FileContext class. Not quite there yet, but almost 2013-04-26 17:45:03 -04:00
Marius Kintel 9a297ecee5 Refactoring: Split out FileModule from Module, Added LocalScope renamed some confusing 'evaluate' methods to 'instantiate', added FileContext (not yet used) 2013-04-26 17:45:03 -04:00
Marius Kintel b4568a09df Refactored assignments and assignments_var into one component 2013-04-26 17:43:40 -04:00
Marius Kintel 58bd9c9e3f Cleaned up argument list handling, related to #116 2013-04-18 18:34:14 -04:00
Marius Kintel a37813a899 Refactored context handling into using separate Module contexts and Eval contexts. This allows for recursive module calls, and cascading children. I believe this fixes issue #116 2013-04-09 00:28:16 -04:00
Marius Kintel 1b8b7aa5fa I think this should fix issue #217 2013-04-05 01:30:09 -04:00
Marius Kintel 40d9ffe6a4 Changed redeclaration of assignment so that the last declaration defines the order. This hopefully fixes the confusing error message discussed on the mailing list nov 27-30 (Variable bug) 2013-03-11 17:54:49 -04:00
Marius Kintel 502ecbb6ca Block recursion on circular or recursive inclusions. Fixes #187 2012-09-02 13:17:14 -04:00
Marius Kintel 2316127e62 Handle include dependencies 2012-02-17 23:05:36 +01:00
Marius Kintel b9d218e137 Initial implementation of ModuleCache and dependency tracking of used modules 2012-02-15 01:32:37 +01:00
Marius Kintel 11fb1f71da Additional fixes after merging with master 2012-01-04 23:28:16 +01:00
Marius Kintel 4ff2d1af44 Some light refactoring attempts, didn't get very far.. 2011-12-26 16:34:47 +01:00
Marius Kintel 5417b4fa65 Ported use for Qt's foreach to BOOST_FOREACH 2011-09-04 20:35:23 +02:00
Marius Kintel 6f632190a0 Ported a bunch of stuff from Qt to STL 2011-09-03 06:10:36 +02:00
clifford d3329838b4 Clifford Wolf:
Implemented 'use' statement



git-svn-id: http://svn.clifford.at/openscad/trunk@459 b57f626f-c46c-0410-a088-ec61d464b74c
2010-02-28 13:48:04 +00:00
clifford 955de4aa1b Clifford Wolf:
Added include<...> statement
	Prepared use<...> statement



git-svn-id: http://svn.clifford.at/openscad/trunk@457 b57f626f-c46c-0410-a088-ec61d464b74c
2010-02-27 22:30:36 +00:00
kintel 5726317461 Support for if-else statements
git-svn-id: http://svn.clifford.at/openscad/trunk@436 b57f626f-c46c-0410-a088-ec61d464b74c
2010-02-12 13:20:15 +00:00
kintel 191dc4857c header file reorg
git-svn-id: http://svn.clifford.at/openscad/trunk@365 b57f626f-c46c-0410-a088-ec61d464b74c
2010-01-30 04:26:05 +00:00