Quellcode durchsuchen

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 vor 11 Jahren
Ursprung
Commit
909a03eeaf
1 geänderte Dateien mit 11 neuen und 0 gelöschten Zeilen
  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"