nitra icon indicating copy to clipboard operation
nitra copied to clipboard

support vs 2017

Open furesoft opened this issue 8 years ago • 5 comments

is there a installer for vs 2017?

furesoft avatar May 22 '17 17:05 furesoft

What do you mean? To build language projects, you need to build Nitra on a computer (https://github.com/rsdn/nitra/wiki/Nitra-Build-process).

VladD2 avatar Aug 15 '17 02:08 VladD2

ValdD2, thanks, I've followed the instructions and build the tools successfully. However, as a newbie, I don't know what to do next to get this integrated in the VS 2007? Is there any documentation or tutorial for beginners? thanks much.

jianyunli avatar Aug 18 '17 06:08 jianyunli

Hello @jianyunli,

I would suggest you start with one of the samples and go from there.

Full Nitra parser has four major parts:

  1. Language definition: https://github.com/rsdn/Nitra-Mini-C/blob/master/Nitra-Mini-C/MiniC-Language.nitra
  2. Syntax parser: https://github.com/rsdn/Nitra-Mini-C/blob/master/Nitra-Mini-C/MiniC-syntax.nitra
  3. Language AST: https://github.com/rsdn/Nitra-Mini-C/blob/master/Nitra-Mini-C/MiniC-ast.nitra
  4. The mapping between syntax and AST: https://github.com/rsdn/Nitra-Mini-C/blob/master/Nitra-Mini-C/MiniC-Mapping.nitra

Also, you need to implement IProjectSupport interface on your top-most AST type: https://github.com/rsdn/Nitra-Mini-C/blob/master/Nitra-Mini-C/CompilationUnit.n

ionoy avatar Aug 18 '17 07:08 ionoy

Hi @ionoy, thanks much, I'll get started. It says it can generate a parser for the IDE, actually that is what I need. Is it possible for my DSL, that I can put a squiggle for "incorrect" part , for example squiggle var x = "123" - 1 // string minus integer does not make sense

jianyunli avatar Aug 18 '17 14:08 jianyunli

Yes, of course. This is an example from Mini-C: https://github.com/rsdn/Nitra-Mini-C/blob/master/Nitra-Mini-C/MiniC-ast.nitra#L203

ionoy avatar Aug 18 '17 19:08 ionoy