Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
Signed-off-by: Adel Urazov <[email protected]>
  • Loading branch information
a-urazov committed Jun 20, 2021
1 parent 1710c99 commit b53cac4
Show file tree
Hide file tree
Showing 37 changed files with 8 additions and 2,282 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions examples/tcpserver.mp → examples/tcpserver.vm
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ for {
printf("Accepted client, Address=%s\n", conn.addr())
}
spawn fn(conn) { //spawn a thread to handle the connection
println(conn.read())
println(conn.read())
}(conn)

} //end for

let ret = ln.close()
if (ret == false) {
println("Server close failed, error:", ret.message())
}
}
Binary file modified fmt
Binary file not shown.
Binary file modified highlight
Binary file not shown.
6 changes: 3 additions & 3 deletions internal/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -1299,9 +1299,9 @@ func (p *Parser) getIncludedStatements(importpath string) (*ast.Program, error)
fn := filepath.Join(path, importpath+".vm")
f, err := ioutil.ReadFile(fn)
if err != nil { //error occurred, maybe the file do not exists.
// Check for 'MAGPIE_ROOT' environment variable
includeRoot := os.Getenv("MAGPIE_ROOT")
if len(includeRoot) == 0 { //'MAGPIE_ROOT' environment variable is not set
// Check for 'VM_ROOT' environment variable
includeRoot := os.Getenv("VM_ROOT")
if len(includeRoot) == 0 { //'VM_ROOT' environment variable is not set
return nil, fmt.Errorf("Syntax Error:%v- no file or directory: %s.vm, %s", p.curToken.Pos, importpath, path)
} else {
fn = filepath.Join(includeRoot, importpath+".vm")
Expand Down
Binary file modified mdoc
Binary file not shown.
18 changes: 0 additions & 18 deletions misc/SublimeText3/README.md

This file was deleted.

Loading

0 comments on commit b53cac4

Please sign in to comment.