NeCo Language is an interpreted programming language built in Go. It features a clean, readable syntax and is statically typed for enhanced safety and reliability. NeCo compiles to byte code, which is run on the NeCo Virtual Machine.
- Install requirements:
- Go 1.21.5
- make
- MakeGo (optional, for packaging)
- Use
make build
. The compiled binary will be inbuild/debug/
.
NeCo Lang can be downloaded as a binary, as a package from the Releases page or using Go's package manager.
- Run:
go install github.com/DanielNos/neco@latest
- Download the correct NeCo Lang binary for your system.
- Move the package to /usr/local/bin:
mv [binary name] /usr/local/bin/neco
- Download the correct NeCo Lang binary for your system.
- Move it to the folder where it should be installed.
- Open the Edit the system environment variables application.
- Go to the Advanced tab and click on the Environment Variables... button.
- Find the Path environment variable and click Edit.
- Click New and write the path to your installation folder to the new Field.
- Click OK. You may need to restart your terminal or system to apply this change.
- Download the correct NeCo Lang package for your package manager.
- Install it using the package manager:
- APT:
sudo apt install [package path]
- DNF:
sudo dnf install [package path]
- PacMan:
sudo pacman -S [package path]
- APT:
- Create a file
main.neco
with the following content:
fun entry() {
printLine("Hello World!")
}
- Run
neco main.neco
. - You should see
Hello World!
in your terminal.
neco [action] [flags] (target)
Each action has its own valid flags.
help
Prints help.run
Runs NeCo binary.build
Builds a NeCo Language file to a NeCo binary.-to
,--tokens
Prints lexed tokens.-tr
,--tree
Draws abstract syntax tree.-i
,--instructions
Prints generated instructions.-d
,--dont-optimize
Compiler won't optimize byte code.-s
,--silent
Doesn't produce info messages when possible.-n
,--no-log
Doesn't produce any log messages, even if there are errors.-l (level)
,--log-level (level)
Sets logging level. Possible values are 0 to 5 or level names.-o
,--out
Sets output file path.-c
,--constants
Prints constants stored in binary.
analyze
Does syntax and semantic analysis on a NeCo Language source file.-to
,--tokens
Prints lexed tokens.-tr
,--tree
Draws abstract syntax tree.-d
,--dontOptimize
Compiler won't optimize byte code.