Bit Negating now works properly for different types
This commit is contained in:
40
main.cpp
40
main.cpp
@@ -31,6 +31,45 @@ For now I don't thing it should be overloadable.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Type resolution cases
|
||||
|
||||
CONST :: expr - dont need to handle
|
||||
make new symbol
|
||||
|
||||
val := expr (1)
|
||||
convert untyped to typed default
|
||||
check bounds
|
||||
make new symbol
|
||||
|
||||
call(default:type = expr) (1)
|
||||
val: type = expr (1)
|
||||
convert untyped to typed based on type
|
||||
make sure expr.type == type
|
||||
check bounds
|
||||
|
||||
expr == expr (2)
|
||||
expr * expr (2)
|
||||
make sure compatible types, floats with ints are ok(convert to float)
|
||||
if only one of them is typed convert the untyped to typed
|
||||
if both types typed make sure they are the same
|
||||
check bounds
|
||||
|
||||
!expr
|
||||
make sure correct type
|
||||
return bool
|
||||
|
||||
compound(expr)
|
||||
call(expr, expr)
|
||||
convert untyped to matching typed
|
||||
check if types match
|
||||
|
||||
cast(expr: type)
|
||||
convert from untyped to typed
|
||||
convert between typed to other typed
|
||||
check if types compatible
|
||||
|
||||
|
||||
|
||||
@todo
|
||||
[ ] - Fix casting
|
||||
[ ] - Passing down program to compile through command line
|
||||
@@ -59,6 +98,7 @@ For now I don't thing it should be overloadable.
|
||||
[ ] - [Using] keyword that brings in the struct enviroment into current scope etc.
|
||||
[ ] - Constant arrays that evaluate fully at compile time
|
||||
[ ] - Rust like enum where you associate values(other structs) with keys
|
||||
[ ] - Compound that zeros values - .{} , Compound that assumes defaults from struct definition - {}
|
||||
|
||||
@donzo
|
||||
[x] - Test new operators, add constant eval for them
|
||||
|
||||
Reference in New Issue
Block a user