public static ExpressionNode Throw(PluginRoot Plugin, ExpressionNode Node, CodeString Code, bool End = true) { var Global = Plugin.Container.GlobalContainer; var Func = Identifiers.GetByFullNameFast <Function>(Global, "Internals.ThrowException"); if (Func == null) { return(null); } Node = Expressions.Call(Code, Plugin, Func, Node); return(Node == null || !End ? Node : Plugin.End(Node)); }
public static ExpressionNode Negate(PluginRoot Plugin, ExpressionNode Node, CodeString Code, bool End = false) { var Ch = new ExpressionNode[] { Node }; Node = Plugin.NewNode(new OpExpressionNode(Operator.Not, Ch, Code)); if (Node == null) { return(null); } if (End && Plugin.End(ref Node) == PluginResult.Failed) { return(null); } return(Node); }