1using System.Collections;
34 string[] parts = query.Split(
39 StringSplitOptions.RemoveEmptyEntries
41 string varName = parts[0].Trim();
42 string queryStr = parts[1].Trim();
70 foreach (
BadObject o1
in query.Execute(ctx))
79 throw new Exception($
"Error in LINQ Where: {varName} => {query} : {r.ToSafeString()} is not a boolean");
90 public static object?[]
ToArray(
this IEnumerable enumerable)
92 return Enumerable.ToArray(enumerable.Cast<
object?>());
100 public static IEnumerable<BadExpression>
Parse(
string src)
The Parser of the Language. It turns Source Code into an Expression Tree.
static IEnumerable< BadExpression > Parse(string fileName, string source)
Parses a BadExpression from the Source Reader.
Base Implementation for all Expressions used inside the Script.
Implements the Operator Table used by the Parser.
static BadOperatorTable Instance
The Operator Table Instance.
Implements the Source Code Reader.
The Execution Context. Every execution of a script needs a context the script is running in....
BadScope Scope
The Root Scope of the Context.
Provides settings for creating a new BadExecutionContext
BadExecutionContext Build()
Builds a new BadExecutionContext with the options provided in this Options Instance.
void DefineVariable(string name, BadObject value, BadScope? caller=null, BadPropertyInfo? info=null, BadObject[]? attributes=null)
Defines a new Variable in the current scope.
Implements a Reflected Object.
The Base Class for all BadScript Objects.
static bool CanWrap(object? o)
Returns true if the given object cam be wrapped.
static readonly BadObject Null
The Null Value for the BadScript Language.
Implements Common Functionality to parse Linq Queries in BadScript2.
static string varName
Parses a Predicate Query into a Variable Name and a Query Expression.
static string string query ParsePredicate(string query)
static IEnumerable< BadExpression > Parse(string src)
Parses the given source into an IEnumerable of BadExpressions.
static bool InnerWhere(string varName, BadExpression query, object? o)
The Where Lamda Function for the Linq Extensions.
static readonly BadExecutionContextOptions PredicateContextOptions
The Predicate Context Options for the Linq Extensions.
static ? object[] ToArray(this IEnumerable enumerable)
Materializes the given IEnumerable into an Array.
Implements the Interface for Native Boolean.
Contains the Expressions for the BadScript2 Language.
Contains the Operators for the BadScript2 Language.
Contains the Parser for the BadScript2 Language.
Contains the Source Reader for the BadScript2 Language.
Contains the Classes for Reflection Objects.
Contains the Native Runtime Objects.
Contains the Runtime Objects.
Contains the Runtime Implementation.
Contains the Linq Implementation and Extensions.