How would one go about adding (minor) syntactic sugars to Java?

Posted by polygenelubricants on Stack Overflow See other posts from Stack Overflow or by polygenelubricants
Published on 2010-03-07T11:16:54Z Indexed on 2010/03/08 19:06 UTC
Read the original article Hit count: 165

Suppose I want to add minor syntactic sugars to Java. Just little things like adding regex pattern literals, or perhaps base-2 literals, or multiline strings, etc. Nothing major grammatically (at least for now).

How would one go about doing this?

Do I need to extend the bytecode compiler? (Is that possible?)

Can I write Eclipse plugins to do simple source code transforms before feeding it to the standard Java compiler?

© Stack Overflow or respective owner

Related posts about java

Related posts about eclipse