8000 GitHub - infastin/toy: A toy scripting language written in Go.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

infastin/toy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Toy Language

Go Reference

The Toy Language is a small, dynamic, toy scripting language written in Go.

Toy is somewhat similar to Go, but was created as a configuration language to ditch another YAML DSL. Its codebase is based on The Tengo Language, but it has been modified to make the language more comfortable to work with and add missing features and functionality. Do not expect this language to be blazingly fast, it relies heavily on interfaces and reflection, and it is even slower than Tengo.

fmt := import("fmt")

fib := fn(n) {
  if n == 0 {
    return 0
  } else if n == 1 {
    return 1
  }
  return fib(n-1) + fib(n-2)
}

fmt.println(fib(35)) // 9227465

References

Editor Support

About

A toy scripting language written in Go.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%
0