Skip to content

Interpreter for the Vanadium Avo Programming Language

Notifications You must be signed in to change notification settings

Vanadium-Development/avo

Repository files navigation

Vanadium® Avo™

Image


Syntax Sample

complex Greeting {
    name: string
}

fun {
    fun greet(g: Greeting) {
        println("Hello, " + g.name + "!")
    }

    greet(new Greeting {
        name = "World"
    })

    fun sumNumbersBetween(a: int, b: int) -> int {
        var sum: int
        loop i excl a -> excl b {
            sum = sum + i
        }
        return sum
    }

    println("The sum between 0 and 10 is: " + sumNumbersBetween(0, 10))
}()

API Example

fun main() {
    Interpreter {
        sourcePath { "input.avo" }
        functionLoaderSource(InternalConsoleFunctions::class)
        functionLoaderSource(InternalMathFunctions::class)
        errorHandling {
            exitOnError()
            handlerImplementation { MordantErrorHandler }
        }
    }.exists {
        run()
    }
}

About

Interpreter for the Vanadium Avo Programming Language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published