Improved type system

This commit is contained in:
2024-08-08 12:55:25 +02:00
parent d624a5f895
commit 5d9be01a85
20 changed files with 111 additions and 67 deletions

View File

@ -233,7 +233,7 @@ func (s *Scanner) scanFile(path string, pkg string) error {
typeEnd--
}
function.ReturnTypes = types.NewList(tokens[typeStart:typeEnd], contents)
function.ReturnTypes = types.ParseList(tokens[typeStart:typeEnd], contents)
}
parameters := tokens[paramsStart:paramsEnd]
@ -245,7 +245,7 @@ func (s *Scanner) scanFile(path string, pkg string) error {
}
name := tokens[0].Text(contents)
dataType := types.New(tokens[1:].Text(contents))
dataType := types.Parse(tokens[1:].Text(contents))
register := x64.InputRegisters[count]
uses := token.Count(function.Body, contents, token.Identifier, name)