Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extensibility: allow for types not derived from Expression or other types in System.Linq.Expressions #41

Open
zspitz opened this issue Aug 26, 2020 · 0 comments
Labels
extensibility Related to extending renderers and using custom types
Milestone

Comments

@zspitz
Copy link
Owner

zspitz commented Aug 26, 2020

Currently, in order to figure out which object is a node while visiting, we use a List<Type> for node types:

public readonly static List<Type> NodeTypes = new List<Type>() {
    typeof(Expression),
    typeof(MemberBinding),
    typeof(ElementInit),
    typeof(SwitchCase),
    typeof(CatchBlock),
    typeof(LabelTarget)
};

and a corresponding List<Type> which includes IEnumerable<> variants of each of these types. This allows visitors to treat non-Expression-derived types (such as SwitchCase or ElementInit) as nodes.

Authors of third-party extension visitors might have similar custom nodes which don't derive from Expression.

@zspitz zspitz modified the milestones: 3.0.0, 3.1 Sep 14, 2020
@zspitz zspitz added the extensibility Related to extending renderers and using custom types label Sep 16, 2020
@zspitz zspitz modified the milestones: 3.1, 4.0 Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extensibility Related to extending renderers and using custom types
Projects
None yet
Development

No branches or pull requests

1 participant