/// <summary> /// Return a Guid associated with the T* instance. /// </summary> protected unsafe Guid RegisterNode(TreeNode* node) { Guid guid = Guid.NewGuid(); nodes[guid] = (IntPtr)node; return guid; }
extern static unsafe void _t2json(Defs* d, TreeNode* tree, int indent, char* buf);
protected unsafe string Dump(Defs defs, TreeNode* node) { string ret = String.Empty; try { fixed (char* buf = new char[10000]) { __t_dump(&defs, node, 0, buf); ret = Marshal.PtrToStringAnsi((IntPtr)buf); } } catch (Exception ex) { // TODO: Log message System.Diagnostics.Debug.WriteLine(ex.Message); System.Diagnostics.Debugger.Break(); } return ret; }
extern static unsafe int _t_matchr(TreeNode* semtrex, TreeNode* matchAgainst, TreeNode** matchResult);
extern static unsafe TreeNode* _t_embody_from_match(Defs* d, TreeNode* matchResult, TreeNode* semtrex);
extern static unsafe int _t_match(TreeNode* semtrex, TreeNode* matchAgainst);
// [return: MarshalAs(UnmanagedType.LPStr)] extern static unsafe void __t_dump(Defs* defs, TreeNode* t, int level, char* buf);
extern static unsafe int _t_children(TreeNode* structures);
extern static unsafe SemanticID _dv_define_structure(TreeNode* structures, [MarshalAs(UnmanagedType.LPStr)] string label, int num_params, __arglist);
extern static unsafe SemanticID _d_declare_symbol(TreeNode* symbols, SemanticID sid, string label, UInt16 context);