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

Offline AZ

  • Multiple posting newcomer
  • *
  • Posts: 124
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: latest available from Jen's RPM repo for Fedora
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

  • Multiple posting newcomer
  • *
  • Posts: 124
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: latest available from Jen's RPM repo for Fedora
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: 12002
    • 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

  • Multiple posting newcomer
  • *
  • Posts: 124
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: latest available from Jen's RPM repo for Fedora
Thread model: posix
gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12002
    • 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!]