Skip to content

Doswind/covscript

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,382 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Covariant Script Programming Language: The Interpreter

Action Status Schedule Status
Welcome to the Covariant Script programming language!
Covariant Script is an open source, cross-platform programming language.
This project is an officially maintained Covariant Script interpreter.

Switch language

Features

  • Cross-platform, supporting most mainstream Operating Systems
    • GNU/Linux: x86, ARM, MIPS, Loongson 3A3000/4000
    • Microsoft Windows: x86
    • Apple macOS: x86
  • Powerful and bloat-free extension system
    • C/C++ Native Interface(CNI) System: translate invoking from both C/C++ and Covariant Script
    • Interpreter Bootstrap: A portable way to access the Covariant Script Runtime from C++
    • CNI Composer Macro: Combined the extension system and CNI system organically
  • Good compatibility -- written in C++14
  • Dependency-free and efficient compiler front-end
  • Exportable compilation results
  • Support compile-time optimization
  • Runtime hotspot optimization
  • Efficient memory management system
  • Compile-time optimization
  • Reference count garbage collection system

Extensions

Documentation

CovScript Official Document(PDF)

Installation

Run

Basic command

cs [options...] <FILE> [arguments...]
cs [options...]

Options

Interpreter
Option Mnemonic Function
--compile-only -c Only compile
--dump-ast -d Export abstract syntax tree
--dependency -r Export module dependency
Interpreter REPL
Option Mnemonic Function
--silent -s Close the command prompt
--args <...> -a <...> Set the covscript arguments

Note that everything you set after option --args or its mnemonic -a will be regarded as arguments.

Common
Option Mnemonic Function
--no-optimize -o Disable optimizer
--help -h Show help infomation
--version -v Show version infomation
--wait-before-exit -w Wait before process exit
--log-path <PATH> -l <PATH> Set the log path
--import-path <PATH> -i <PATH> Set the import path

Note that if you do not set the log path, it will be directly output to the standard output stream.

Debugger

cs_dbg [options...] <FILE>

Options

Option Mnemonic Function
--help -h Show help infomation
--version -v Show version infomation
--wait-before-exit -w Wait before process exit
--log-path <PATH> -l <PATH> Set the log path
--import-path <PATH> -i <PATH> Set the import path

Note that if you do not set the log path, it will be printed to stdout.

Examples

The examples folder contains several example programs written by CovScript.

Copyright

The author of the Covariant Script Programming Language is @mikecovlee.
Copyright © 2020 Michael Lee

By me a coffee

See 中文文档/捐献

Thanks

Ordered by contribution.

About

Covariant Script Interpreter

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • C++ 96.5%
  • C 2.6%
  • Other 0.9%