Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.
/ CobaltLang Public archive

A transpiler for the programming language called Cobalt. Transpiles into Golang.

License

Notifications You must be signed in to change notification settings

MonliH/CobaltLang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CobaltLang

This project is no longer under active development

A transpiler for the programming language called Cobalt. Transpiles into Golang.

There is a better programming language called Coperr

Tested only on windows.

Still in bata phase, there are lots of bugs in the code

Dependencies

Documentation

View the wiki for the documentation.

Build

In the terminal run these commands:

cd C:\dir_to_Cobaltlang_src

python Cobalt.py C:\dir_to_code\codename.cobalt True

Or go to the directory of your code:

cd C:\dir_to_code

python C:\dir_to_Cobaltlang_src\Cobalt.py code.cobalt True

You could also add bin to your path and run this:

cd C:\dir_to_code

Cobalt code.cobalt True

Building the code creates a go file in the same directory as the code.

If you write f, n, no, false, or False at the end, it will compile the Go code, but if you write t, y, yes, True, or true, it will not compile the Go code but only turn it into Go code

For example this code will not run the Go compiler:

cd C:\dir_to_code

Cobalt code.cobalt False

Example

Here is an example of how to print "Hello World" in Cobalt:

display:"Hello World";

Save this file as a .cobalt file.

Notice what the Go code looks like:

package main

import "fmt"

func main() {
	fmt.Println("Hello World")

}

The Cobalt transpiller will try to make the go code the most readable.

About

A transpiler for the programming language called Cobalt. Transpiles into Golang.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages