• 1Installation
  • 2Write First Sweet Apex
  • 3Transpile It
  • 4Transpiled Apex Class
  • 5Deploy and Check

Sweet.apex

  • Docs
  • Tutorials
Getting started with Sweet.apex

Transpiled Apex Class

Go to /Users/wilson/sweet_apex/build and check what has been generated. You can find a file called HelloSweetApex.cls, and it looks like this:

public class HelloSweetApex {
    public static void main() {
        Integer a = 5;
        Integer b = 7;
        System.debug(Math.mod(a, b));
    }
}

Note that a % b has been translated to Math.mod(a, b). This is a typical example of how Sweet Apex codes are transpiled to Apex codes.

Done