Author Topic: addition of a nother language  (Read 10379 times)

Offline AZ

  • Almost regular
  • **
  • Posts: 151
addition of a nother language
« on: August 30, 2012, 05:24:42 am »
Hello,
 is it possible to add the support (editor + compile, debug) of another C-like language? I primarily interested in GO ( golang.org)
Thank you
AZ
CB: nightly build .
Thread model: posix
gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC)

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: addition of a nother language
« Reply #1 on: September 01, 2012, 01:54:56 pm »

Offline AZ

  • Almost regular
  • **
  • Posts: 151
Re: addition of a nother language
« Reply #2 on: September 14, 2012, 07:59:57 pm »
Yes, see: Adding support for non C/C++ files to the build system.

Thank you Alpha,
 how about syntax highlighting and code competition ?
CB: nightly build .
Thread model: posix
gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC)

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: addition of a nother language
« Reply #3 on: September 15, 2012, 04:14:30 pm »
Syntax highlighting, yes: Creating a custom lexer for Code::Blocks editor.  If GO is similar in syntax to C, it would probably be easiest to just copy lexer_cpp.xml, and edit the filemasks and keywords.

Code completion is a little more difficult :).  The current Code Completion plugin will provide suggestions based on the keywords in the current lexer.  If you want more than that, it would require writing your own code completion plugin.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: addition of a nother language
« Reply #4 on: September 15, 2012, 04:23:58 pm »
Code completion is a little more difficult :).  The current Code Completion plugin will provide suggestions based on the keywords in the current lexer.  If you want more than that, it would require writing your own code completion plugin.
And it will require changing some API interfaces here and there to minimize code and UI duplication between the different CC plugins.

You can always look at the Fortran plugins. I think they have implemented a CC for Fortran -> http://darmar.vgtu.lt/
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline AZ

  • Almost regular
  • **
  • Posts: 151
Re: addition of a nother language
« Reply #5 on: September 15, 2012, 04:53:08 pm »
...
You can always look at the Fortran plugins. I think they have implemented a CC for Fortran -> http://darmar.vgtu.lt/

There is gocode (https://github.com/nsf/gocode) daemon already. it's real good and widely used in the GO community. How difficult will be to integrate it ?

GO is C-like language, so i'll look into modifiyng the existing template as suggested. Thank you!

Another question how to add the parsing of the packages and jummps to definitions/ declarations?


Andrew
CB: nightly build .
Thread model: posix
gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: addition of a nother language
« Reply #6 on: September 15, 2012, 05:20:03 pm »
There is gocode (https://github.com/nsf/gocode) daemon already. it's real good and widely used in the GO community. How difficult will be to integrate it ?
Probably it won't be too hard to integrate. The problem is that there will be some fighting between the CC for C++ and CC for Go, but I've not dug too much into the codebase.
Please take a look at the Fortran's plugin and our codecompletion plugins.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline LMS-PT

  • Single posting newcomer
  • *
  • Posts: 1
Re: addition of a nother language
« Reply #7 on: November 09, 2023, 05:40:10 pm »
Hello,

I am not a developer.
I am just a mechanical engineer we works on product design... and nowadays almost every product/machine we design has to include some embedded electronics (Sensors, Microcontrollers, SBC's, etc...)
[Other colleagues do that work... But I like to learn/know a little bit of that too]...

Recently, I've heard of a new language (Zig) that is trying to address the space where C/C++ are kings, but it follows a pragmatic approach of working together with C/C++, so that it's compiler can even complile C/C++ code...
Since I like Code::Blocks as my IDE for simple C tutorials/exercises, I think it would also be a great fit for the Zig Language...

Can someone add this feature [plugins] or reach someone in the Zig comunity for them to develop it?
Thanks.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: addition of a nother language
« Reply #8 on: November 09, 2023, 07:53:48 pm »
Hello,

I am not a developer.
I am just a mechanical engineer we works on product design... and nowadays almost every product/machine we design has to include some embedded electronics (Sensors, Microcontrollers, SBC's, etc...)
[Other colleagues do that work... But I like to learn/know a little bit of that too]...

Recently, I've heard of a new language (Zig) that is trying to address the space where C/C++ are kings, but it follows a pragmatic approach of working together with C/C++, so that it's compiler can even complile C/C++ code...
Since I like Code::Blocks as my IDE for simple C tutorials/exercises, I think it would also be a great fit for the Zig Language...

Can someone add this feature [plugins] or reach someone in the Zig comunity for them to develop it?
Thanks.

I think adding Zig to scintilla https://www.scintilla.org/Lexilla.html would be a good step to do by someone in the Zig community.
I am downloading Zig right now to see if it looks easy to add to the CB list of compilers for doing C or C++ programming.
Edit: The build system is not like that of GCC; using an CB custom makefile might allow building under CB.
Edit2: I figured out how to get it to act like an normal GCC like compiler.
Code
zig cc --help
shows the C Compiler like options.

Tim S.
« Last Edit: November 09, 2023, 10:20:47 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org