Explorar el Código

a messy try of implementing a plugin system for code generator
Manual:
*run a build
*look into tool/generate_builtin.py
*seach opcua.c for "Hello"

Stasik0 hace 11 años
padre
commit
909a03eeaf
Se han modificado 1 ficheros con 11 adiciones y 0 borrados
  1. 11 0
      tool/plugin_Node.py

+ 11 - 0
tool/plugin_Node.py

@@ -0,0 +1,11 @@
+from __future__ import print_function
+
+def setup():
+	config = dict()
+	config["pluginType"] = "structuredObjectCreation";
+	config["tagName"] = "Node";
+	return config
+
+def createElement(element, fc, fh):
+	print("/* Hello from plugin */", end='\n', file=fc)
+	return "continue"