Giter VIP home page Giter VIP logo

evobasic-lang's Introduction

What is evoBasic

ENG / δΈ­ζ–‡

EvoBasic is a "evolution version" of classic visual basic,which aims to offer simple syntax and modern features.

It is an cross-platforms,object-oriented,strongly typed programming language, compiled to bytecode and run on evoBasic virtual machine.

Language manual

Features

  • Data encapsulation

  • Polymorphism

  • Inheritance

  • First-class functions

Syntax example

Function Fibonacci(Byval x as Integer) As Integer
	If x == 0 Then 
		Return 0
	ElseIf x == 1 Then
		Return 1
	Else
		Return Fibonacci(x - 1) + Fibonacci(x - 2)
	End if
End Function
Public Module UI
    Public Enum Message 
        Update = 1
        Resize
        Hide
    End Enum

    Public Interface MessageReciver
         Function OnMessage(Byval msg as Message,Optional ByRef sender as UIObject) As Boolean
    End Interface

    Private Type Position
        x As Integer
        Y as Integer
    End Type

    Public Class Button Impl MessageReciver
        Private pos As Position
        Public Override Function OnMessage(Byval msg as Message,Optional ByRef sender as UIObject) As Boolean
            // process message...
        End Function
    End Class
End Module

Sub Main()
    Dim btn As UI.Button, msg As UI.Message
    btn = New UI.Button
    msg = UI.Message.Update
    btn.OnMessage(msg)
End Sub

For a complete definition about syntax, see grammar.bnf.

Project status

  • lexer and parser: generate parse tree
  • semantic check: type check,generate symbol table and translate parse tree to abstract tree
  • IL generator: translate abstract tree to intermediate language
  • package file (.bkg) generator and loader
  • package manager
  • evoBasic vm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.