-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e8c4307
commit ab3638d
Showing
40 changed files
with
407 additions
and
155 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
global with sharing class Configuration { | ||
public static Configuration.SharingMode evaluationSharingMode; | ||
|
||
global enum SharingMode { | ||
WITH, | ||
WITHOUT | ||
} | ||
|
||
global SharingMode sharing = SharingMode.WITH; | ||
global Boolean printAst = false; | ||
public Boolean withDiagnostics = false; | ||
|
||
global Configuration respectSharing(Boolean respect) { | ||
sharing = respect ? SharingMode.WITH : SharingMode.WITHOUT; | ||
return this; | ||
} | ||
|
||
global Configuration printAst() { | ||
printAst = true; | ||
return this; | ||
} | ||
|
||
global Configuration withDiagnostics() { | ||
withDiagnostics = true; | ||
return this; | ||
} | ||
|
||
public void subscribe(EvaluatorEventNotifier notifier) { | ||
// Always subscribe to the event that sets the sharing mode | ||
// at the beginning of the evaluation regardless of configuration. | ||
notifier.subscribe(OnEvaluationStartEvent.class, new EvaluationSharingModeSetter()); | ||
|
||
if (this.printAst) { | ||
notifier.subscribe(OnAfterParseEvent.class, new AstPrinter()); | ||
} | ||
|
||
if (this.withDiagnostics) { | ||
EvaluationDiagnosticsListener diagnosticsListener = new EvaluationDiagnosticsListener(); | ||
notifier.subscribe(OnEvaluationStartEvent.class, diagnosticsListener); | ||
notifier.subscribe(OnEvaluationEndEvent.class, diagnosticsListener); | ||
} | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 0 additions & 46 deletions
46
expression-src/main/src/interpreter/DiagnosticsDecorator.cls
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.