-
feat(operator): allow operator overloading for binary/unary/print op · 3b7bf68eTianqi Yang authored
Add support for operator overloading: - Binary operator: + : add - : sub * : mul / : div % : mod &&: and ||: or ==: eq !=: ne < : lt > : gt <=: le >=: ge - Unary operator: - : neg ! : not - print function Binary operator overloading: - Try to find op and rop, if ambiguous then issue an error Modify AST: - Add member callExpr to some of the nodes to store operator function Add errors: - BinaryOperatorAmbiguousError: Ambiguous candidates for binary operator - BinaryOperatorNotFoundError No method match the binary operator - UnaryOperatorNotFoundError No method match the unary operator
3b7bf68e
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| TransPass1.java | Loading commit data... | |
| TransPass2.java | Loading commit data... | |
| Translater.java | Loading commit data... |