Implemented length storage of allocated memory
This commit is contained in:
parent
79bb606e8d
commit
3043e4e2c4
27 changed files with 134 additions and 49 deletions
|
@ -27,6 +27,14 @@ func (f *Function) CompileCall(root *expression.Expression) (*Function, error) {
|
|||
name = nameNode.Token.Text(f.File.Bytes)
|
||||
|
||||
switch name {
|
||||
case "len":
|
||||
return &Function{
|
||||
Output: []*Output{
|
||||
{
|
||||
Type: types.Int,
|
||||
},
|
||||
},
|
||||
}, f.CompileLen(root)
|
||||
case "syscall":
|
||||
return nil, f.CompileSyscall(root)
|
||||
case "new":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue