Discussion › Forums › discussion › Forgot some details when adding vb
This topic contains 0 voices and has 5 replies.
| Author | Posts |
|---|---|
| Author | Posts |
| October 7, 2006 at 6:08 pm #123 | |
|
webmailusr-msn Member
|
Hi, Simon: I’m happy because you added my code for vb ctags support. However, it will not work because you forgot to add this: FILE: pnwtltaggersctagsnavigatorctagsnavigator.cpp LINE: 70 (function PNFPGetSchemesSupported) currently it is: wcsncpy(schemesBuffer, L”assembler;cobol;cpp;csharp;eiffel;erlang;java;javascript;lisp;lua;makefile;pascal;perl;plsql;python;ruby;shell;tcl;verilog;vhdl;vim;yacc;web”, cchBuffer); Should add: “vb;” so vb scheme is supported: wcsncpy(schemesBuffer, L”assembler;vb;cobol;cpp;csharp;eiffel;erlang;java;javascript;lisp;lua;makefile;pascal;perl;plsql;python;ruby;shell;tcl;verilog;vhdl;vim;yacc;web”, cchBuffer); Maybe the schemesBuffer should be initialized when loading sheme files, so you don’t have to modify this code when ctags supports new languages. Also, maybe you would like to check legal issues because anyedit/deepsoft are named there. Now, about grouping functions inside their respective classes, lets take an example: file test.vb: class FMsg public shared sub MsgError(s as String) MessageBox.Show(s1 & vbCrLf & s2, “MyApp”, MessageBoxButtons.OK, MessageBoxIcon.Stop) end sub end class vb parser would output: fmsg test.vb /^class FMsg$/;” c msgerror test.vb /^ public shared sub MsgError( s as String)$/;” s class:fmsg which means fmsg is (c)lass msgerror is (s)ub in class:fmsg. This info is mistaken by pn, since it says fmsg is a struct, so maybe we have to work on the way vb.c should classify identities: currently I have defined these: static kindOption VBKinds [] = { { TRUE, ‘c’, “class”, “classes” }, { TRUE, ‘d’, “dim”, “variables” }, { TRUE, ‘f’, “function”, “functions” }, { TRUE, ‘k’, “const”, “constants” }, { TRUE, ‘m’, “module”, “modules” }, { TRUE, ‘s’, “sub”, “procedures” }, }; Note that if sub MsgError was defined as “function MsgError”, vb.c outputs (f)unction, and thus PN would put MsgError as a function and not as a struct. However, if we define more than 1 class in the same file, vb.c would output for each member which is its owner class, but PN would ignore it. Well, those are all the details. Regards. |
| October 10, 2006 at 8:31 pm #15134 | |
|
webmailusr-msn Member
|
Hey Simon, have you already read this post? |
| October 14, 2006 at 9:35 pm #15135 | |
|
simon Key Master
|
Hi, yeah I know this needs finishing, I just haven’t got around to it yet. |
| October 22, 2006 at 11:23 am #15136 | |
|
simon Key Master
|
Ok, so I’ve done these changes and I’ll put them in the next build. The thing with subs becoming structs is fixed by extra code in the languageTypeTables.cpp file which maps VB kinds (i.e. c,d,f,k,m,s) into PN types. |
| October 22, 2006 at 11:26 am #15137 | |
|
simon Key Master
|
Do you have some sample code that I can test with? |
| October 22, 2006 at 10:49 pm #15138 | |
|
webmailusr-msn Member
|
Well, there’s a lot of stuff at: http://www.elguille.info/colabora/NET2006/SantiagoBarro_AddinCodigo.htm (It has some #directives, but will not affect) If you would like a code from me, send me an email. Good Luck! |
You must be logged in to reply to this topic.