We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We currently model "n-ary" nodes as direct variants of the expr sum type:
expr
(sum expr // Arithmetic operators (plus (* expr 2)) (minus (* expr 2)) (times (* expr 2)) (divide (* expr 2)) (modulo (* expr 2)) (string_concat (* expr 2)) // Logical operators (and (* expr 2)) (or (* expr 2)) // Comparison operators (eq (* expr 2)) (ne (* expr 2)) (gt (* expr 2)) (gte (* expr 2)) (lt (* expr 2)) (lte (* expr 2)) (in_container (* expr 2)) ...)
However a better method of modeling them that allows for greater re-use of Kotlin code is to model the function as another sum variant:
(sum expr ... (nary nary_op (* expr 2)) ...) (sum nary_op) // Arithmetic operators (plus) (minus) (times) (divide) (modulo) (string_concat) // Logical operators (and) (or) // Comparison operators (eq) (ne) (gt) (gte) (lt) (lte) (in_container) )
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We currently model "n-ary" nodes as direct variants of the
expr
sum type:However a better method of modeling them that allows for greater re-use of Kotlin code is to model the function as another sum variant:
The text was updated successfully, but these errors were encountered: