Repository navigation
docs: describe Evaluate and the available types in README - #42
Merged
Merged
Conversation
README showed only Parse and did not mention Evaluate, which parses, compiles, and runs an expression in one call. It also did not say which types an expression can use by default or how to make other types available. Add sections for both: the predefined types of DefaultBinder, and RegisterType with importAsStatic. It also explains how Parse reports errors, adds the using directives to the Usage example and the null-forgiving operator to both examples, so they compile without nullable warnings, and moves the note on case-insensitive names from the ContextAwareBinder section to Usage, since DefaultBinder resolves names the same way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
README showed only
Parseand did not mentionEvaluate, which parses, compiles, and runs an expression in one call. It also did not say which types an expression can use by default or how to make other types available. This PR adds sections for both: the predefined types ofDefaultBinder, andRegisterTypewithimportAsStatic.It also explains how
Parsereports errors, adds theusingdirectives to the Usage example and the null-forgiving operator to both examples, so they compile without nullable warnings, and moves the note on case-insensitive names from theContextAwareBindersection to Usage, sinceDefaultBinderresolves names the same way.The list of types matches the dictionary in
DefaultBinder, except forInt128andUInt128: they are added under#if NET7_0_OR_GREATER, but the package targets onlynet6.0, so they are not available. README also does not promise that the members of predefined types such asMathcan be used without the type name:MathandMathFare both imported, sopiandabs(-1.5f)are ambiguous. Both issues are left for separate fixes.Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com