I ❤️ C#.
masaxsuzu / monkey Goto Github PK
View Code? Open in Web Editor NEWA Toy Programming Language
License: MIT License
A Toy Programming Language
License: MIT License
VM実行において、Function文以外でreturn命令を実行するとPanicが発生する。
~/go/src/github.com/masa-suzu/monkey
$ go run main.go -vm
Hello! This is the Monkey programming language!
>> return 1;
panic: runtime error: index out of range
goroutine 1 [running]:
github.com/masa-suzu/monkey/vm.(*VirtualMachine).push(0xc0001be080, 0x515f00, 0xc00005e120, 0x0, 0x0)
C:/Users/szk11/go/src/github.com/masa-suzu/monkey/vm/vm.go:260 +0xdf
github.com/masa-suzu/monkey/vm.(*VirtualMachine).Run(0xc0001be080, 0xc0000a4000, 0x10000)
C:/Users/szk11/go/src/github.com/masa-suzu/monkey/vm/vm.go:188 +0xbde
github.com/masa-suzu/monkey/repl.Rep_VM(0xc00005e104, 0x9, 0x515600, 0xc000086008, 0xc00005e100, 0x5da6b8, 0x0, 0x0, 0xc0000a4000, 0x10000, ...)
C:/Users/szk11/go/src/github.com/masa-suzu/monkey/repl/repl.go:87 +0x22e
github.com/masa-suzu/monkey/repl.Start(0x5155e0, 0xc000086000, 0x515600, 0xc000086008, 0x4fad30, 0x3, 0x1)
C:/Users/szk11/go/src/github.com/masa-suzu/monkey/repl/repl.go:33 +0x458
main.main()
C:/Users/szk11/go/src/github.com/masa-suzu/monkey/main.go:21 +0xbc
exit status 2
インタプリタ実行では発生しない。
~/go/src/github.com/masa-suzu/monkey
$ go run main.go
Hello! This is the Monkey programming language!
>> return 1;
1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.