Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature [casting]: Added support for casting operator
::
This update brings support for the casting operator `::` to expressions. It's definition is as a normal operator but is a infix defined on top of the `class` defaults. The cast operator checks and ensures that LHS is a class which is verified by a unique symbol passed to the class static chain. This is stored in the Class.UID which is then re-verified as the class is passed back. This avoids any circular dependency issues
- Loading branch information
Vihan
committed
Jun 16, 2016
1 parent
902369c
commit 489439b
Showing
13 changed files
with
95 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,26 @@ | ||
var a := "b" | ||
var b := "c"; | ||
const d := "e"; | ||
var a := 1; | ||
var _ := 2; | ||
var $ := 3; | ||
var _$:= 4; | ||
var $_:= 5; | ||
var a_:= 6; | ||
var $a:= 7; | ||
var a1:= 8; | ||
|
||
const a := 1; | ||
const a := [1, 2, 3]; | ||
|
||
print a; | ||
print _; | ||
print $; | ||
print _$; | ||
print $_; | ||
print a_; | ||
print $a; | ||
print a1; | ||
print _+$+_$; | ||
print [a,_,$,_$]; | ||
|
||
//@EACH | ||
var 1a := 1; | ||
var a = 1; |