Summary
Implement a unary operators, such as +expr -expr, !expr ~expr
Problem
The language yet hasn't any kind of unary operators to define negative values, logical and bit not operators
Proposed Solution
Modify the Parser and the HIR to handle the unary operators with a new expression type.
Alternatives Considered
N/A
Impact Area
Mark the area most affected:
Example
func negative(n: int): int = -n;
Extra Context
Summary
Implement a unary operators, such as
+expr-expr,!expr~exprProblem
The language yet hasn't any kind of unary operators to define negative values, logical and bit not operators
Proposed Solution
Modify the Parser and the HIR to handle the unary operators with a new expression type.
Alternatives Considered
N/A
Impact Area
Mark the area most affected:
Example
Extra Context