Search code examples
c++cmacosblock

Netbeans 7 and C/C++ blocks


Apple's non-standard language extension, "blocks" (like closures) isn't supported by the parser in Netbeans 7.

I'm a bit unsure as to why this is, since I thought the parser just relied on the compiler.

Is it possible to get Netbeans to recognize the block syntax in any way?

Xcode 4:

xcode parsing blocks Netbeans 7:

netbeans parsing blocks


Solution

  • Most syntax highlighters do not depend on the compiler in that they do not use compiler outputs. In the general case, most have some type of logic or rule that does the syntax highlighting at runtime.
    Otherwise you would have to wait to compile the program to have highlighting.