Live data from Hacker News

Nitra, JetBrains’ research project for language tooling, goes open-source

blog.jetbrains.com

41–42 of 42 posts

Re: Nitra, JetBrains’ research project for language tooling, goes open-source

#41

Can't wait to have a play with this (once I dig up my windows laptop...). I have such amazing respect for the amazing products from jetbrains; having toys to play with like this is just fantastic. I'm particularly interested in the component based grammars; I'd don't quite understand how you can get away with not breaking the 'parent' grammar when you drop an arbitrary child grammar inside of it, but quite looking fo…

> I'd don't quite understand how you can get away with not breaking the 'parent' grammar when you drop an arbitrary child grammar inside of it, but quite looking forward to finding out~

Rakudo, which is built on NQP, is one of the largest of modern langs, but it's technically built out of a series of sub-languages ("slangs") that recursively reference each other. Thus there's a language for grammars, another for strings, another for closures, and all of these work seamlessly together.

Re: Nitra, JetBrains’ research project for language tooling, goes open-source

#42

Just curious, how do they handle broken code? (Like when you start writing a line in the middle of the file, not yet done with it, but already need all the goodness like highlighting and code completion to work.) A common approach with libraries I've encountered is that parser just stops with error - but that's almost unacceptable for use in a proper code editor, which should really try its best to recover and contin…

Most IDEs use pretty smart heuristics for this sort of thing out of necessity. You notice when it is missing: for example, MonoDevelop starts compulsively indenting wrong if you mismatch your brackets anywhere in the file, but other IDEs more gracefully match the local indentation.

In other words, JetBrains has lots of experience with correctly handling partially valid syntax trees in a friendly way.

Post reply on HN