Implemented package imports
This commit is contained in:
parent
3e5adff5e5
commit
fcc4f8d2d9
21 changed files with 510 additions and 353 deletions
|
@ -11,7 +11,15 @@ import (
|
|||
// Registers that are in use must be saved if they are modified by the function.
|
||||
// After the function call, they must be restored in reverse order.
|
||||
func (f *Function) CompileCall(root *expression.Expression) error {
|
||||
funcName := root.Children[0].Token.Text()
|
||||
funcNameRoot := root.Children[0]
|
||||
funcName := ""
|
||||
|
||||
if funcNameRoot.IsLeaf() {
|
||||
funcName = funcNameRoot.Token.Text()
|
||||
} else {
|
||||
funcName = funcNameRoot.Children[0].Token.Text() + funcNameRoot.Token.Text() + funcNameRoot.Children[1].Token.Text()
|
||||
}
|
||||
|
||||
isSyscall := funcName == "syscall"
|
||||
|
||||
if !isSyscall {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue