I want to create an apex parser when the user writes code in Apex (or selects objects and fields with required manipulations). Is there any API provided by Salesforce for Apex code parsing.
Ideally, I would want to create an interface similar to the one seen as a intermediate step of an Approval Process creation. The intermediate step is : Step 2. Specify Entry Criteria. Here when the user selects 'Formula Evaluates to True'. There is a text area box which appears with a 'Check Syntax' button.( Also additional arithmetic and logical functions are provided along with the object and the field lists).
Is there a way that this interface could be created on a custom Visual force page? And is it possible to parse the code written within the textarea box using an Apex Parser?
executeanonymous()
method of the SOAP API to compile an apex code.