瀏覽代碼

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 11 年之前
父節點
當前提交
909a03eeaf
共有 1 個文件被更改,包括 11 次插入0 次删除
  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"