conlang: Introduce as casting
Arbitrary primitive type conversion
Currently implemented as jankily as possible in the interpreter, but it works alright™️
This commit is contained in:
@@ -96,7 +96,9 @@ Shift = Factor (ShiftOp Factor )* ;
|
||||
Factor = Term (FactorOp Term )* ;
|
||||
Term = Unary (TermOp Unary )* ;
|
||||
|
||||
Unary = (UnaryKind)* Member ;
|
||||
Unary = (UnaryKind)* Cast ;
|
||||
|
||||
Cast = Member ("as" Ty)? ;
|
||||
|
||||
Member = Call (Access)* ;
|
||||
Access = '.' (Identifier ('(' Tuple? ')')? | Literal) ;
|
||||
|
||||
Reference in New Issue
Block a user