- Notifications
You must be signed in to change notification settings - Fork101
ExpressionEvaluator Todo List
Coding Seb edited this pageMar 3, 2021 ·39 revisions
ExpressionEvaluator can already do some fun things, but it could do more.Here is just a small list of ideas and todo stuff (maybe some will never be done, But it's a place to keep track of ideas). It's a kind of not dated roadmap.
- Customization of the script evaluation part
- Manage Tuples
- Add
nameofkeyword - Subscribe to event
- Manage
switch case
- Speed up evaluations
- Caching things and consider using expression tree or other intermediate format. (See)
Caching Properties delegates (Do not improve perfs significantly)
- Better variables management
- Declare struct and valuetypes without new keyword
- Scope variables to code blocks (add an option for retrocompatibility)
- Line and (position) in script exceptions
- More self explained exceptions
- Add standard syntax for method declaration (for now see issue#72 Declare methods in scripts)
- Create
Func<>orAction<> - Return a
Func<>or anAction<> - Validate code before evaluate (Hard to do without evaluating things)
Managerefmethod args (see#83)Manageinmethod args (see#83)Manageoutmethod args (see#83)Manageparamsmethods args (see#83)Add aContextobject in addition toVariablesDictionary to allow direct access to it's methods, fields and propertiesManageList<>.ForEachTransform an internal lambda toAction<>orFunc<>when needed (To allow writingList<>.ForEach(x => {}))Typed variables (In version 1.4.3.0 SeeDeclare and init variables in scriptsGeneric types inference (Optimistic way to inferate. Only looking backward for generics in the stack)Add an optionalvarkeyword for variables init. (Better for copy paste with C# code)Manage structs assignationOption to force integer eval as doubleManage numbers decimal separator and functions arguments separatorsManagesizeofkeywordBinary numbersHexadecimal numbers++and--as prefix operatorsDictionary initializersCollection initializersObjects initializersthrowandtry catchexceptionManageExpendoObjectManage calling of Action and Func delegatesManage++and--for indexingManage assignation to indexerManagedo whileProperties set assignationManageforeachManagecontinuekeywordManagebreakkeywordManage blocks in lambda bodyManagereturnkeywordManage comments//and/* */ManageEvaluate<type>(calc)Manage charsOn the fly properties and methods evaluationManage Generic functions and types with<>Manage?:operatorManagenewKeywordManage multi line mode with;? and=++`...Manage blocks likeif for while...
Optimization and/or doing things better
- Speed up evaluations
Manage inline namespaces fasterOption for caching namespace resolutionOption for caching type resolution- [Kept as this] Manage object creation faster (Activator.CreateInstance finally not so slow comparing to others strategy)
More customization
Custom operators (see#27 andAdvanced Customization and Hacking)On the fly operatorsOperators Dictionary easy customisationAdd a way to allow aliases for existing operators likeOr, AndAdd a way to add some custom operators and corresponding implementationsFlexible length of the operatorsTypes : multiple operands vs Single operands (Maybe start with only 2 operands operators)Take care of operators precedences (priorities)
Add generic types inVariableEvaluationEventArgandFunctionEvaluationEventArgfor on the fly evaluations (A list of types when using<>)On the fly static methods and/or propertyBetter onthe fly events priorities management with other evaluations (By adding 2 Pre events See#35)On the fly parsing (event with current expression,ref parsing position and the stack)
Will not (or can not) be done for now
Find a way to manage extensions methods without the need to declaring the static type and without beeing too slow(snippet to add all extensions class providedhere)
- Getting Started
- Variables and Functions
- Operators and Keywords
- C# Types Management
- ExpandoObject
- Code Comments Management
- Advanced Customization and Hacking
- Caching
- Options
- CultureInfoForNumberParsing
- OptionCaseSensitiveEvaluationActive
- OptionVariablesPersistenceCustomComparer
- OptionFluidPrefixingActive
- OptionForceIntegerNumbersEvaluationsAsDoubleByDefault
- OptionNumberParsingDecimalSeparator
- OptionNumberParsingThousandSeparator
- OptionFunctionArgumentsSeparator
- OptionInitializersSeparator
- OptionInlineNamespacesEvaluationRule
- OptionNewFunctionEvaluationActive
- OptionNewKeywordEvaluationActive
- OptionStaticMethodsCallActive
- OptionStaticProperiesGetActive
- OptionInstanceMethodsCallActive
- OptionInstanceProperiesGetActive
- OptionIndexingActive
- OptionStringEvaluationActive
- OptionCharEvaluationActive
- OptionEvaluateFunctionActive
- OptionVariableAssignationActive
- OptionPropertyOrFieldSetActive
- OptionIndexingAssignationActive
- OptionScriptEvaluateFunctionActive
- OptionOnNoReturnKeywordFoundInScriptAction
- OptionScriptNeedSemicolonAtTheEndOfLastExpression
- OptionAllowNonPublicMembersAccess
- Todo List