-
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #302 from MichaelS11/types
0.0.9 Making types now more dynamic
- Loading branch information
Showing
14 changed files
with
1,051 additions
and
861 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package ast | ||
|
||
// Token is used in the lexer to split characters into a string called a token | ||
type Token struct { | ||
PosImpl | ||
Tok int | ||
Lit string | ||
} | ||
|
||
// TypeKind blah | ||
type TypeKind int | ||
|
||
const ( | ||
// TypeDefault default type | ||
TypeDefault TypeKind = iota | ||
// TypePtr ptr type | ||
TypePtr | ||
// TypeSlice slice type | ||
TypeSlice | ||
// TypeMap map type | ||
TypeMap | ||
// TypeChan chan type | ||
TypeChan | ||
) | ||
|
||
// TypeStruct blah | ||
type TypeStruct struct { | ||
Kind TypeKind | ||
Env []string | ||
Name string | ||
Dimensions int | ||
SubType *TypeStruct | ||
Key *TypeStruct | ||
} |
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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.