Skip to content

Covariant Script Interpreter(Education Edition)

License

Notifications You must be signed in to change notification settings

scu-covariant/covscript

 
 

Repository files navigation

Covariant Script Programming Language: The Interpreter(Education Edition)

Build 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(Education Edition).

Switch language

About Education Edition

The Education Edition is a modified version based on the standard version, removing some third-party components and new features that are less stable.
However, as the main project is updated, this version will follow up with more stable features and security fixes.

Features

  • Cross-platform, supporting most mainstream Operating Systems
  • Designed for educational purposes, more stable
  • Powerful and bloat-free extension system
  • Good compatibility -- written in C++14
  • Dependency-free and efficient compiler front-end
  • Serialize optimized AST
  • Efficient memory management system
  • Compile-time optimization
  • Reference count garbage collection system
  • C/C++ Native Interface (CNI)

Extensions

Documentation

CovScript Online Documents

Installation

  • Download the precompiled executable on the Latest Release
  • Directly compile source code with CMake toolchain

Run

Basic command

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

Options

Option Mnemonic Function
--compile-only -c Only compile
--no-optimize -o Disable optimizer
--help -h Show help infomation
--version -v Show version infomation
--wait-before-exit -w Wait before process exit
--dump-ast -d Export abstract syntax tree
--log-path <PATH> -l <PATH> Set the log and AST exporting path
--import-path <PATH> -i <PATH> Set the import path

Note that if you do not set the log and AST exporting path, both will be printed to stdout.

Repl

cs_repl [options...]

Options

Option Mnemonic Function
--help -h Show help infomation
--version -v Show version infomation
--silent -s Close the command prompt
--wait-before-exit -w Wait before process exit
--args <...> -a <...> Set the covscript arguments
--log-path <PATH> -l <PATH> Set the log path
--import-path <PATH> -i <PATH> Set the import path

Note:

  • Everything you set after option --args or its mnemonic -a will be regarded as arguments.
  • If you do not set a 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 © 2019 Michael Lee

Thanks

Ordered by contribution.

Comments

Comments by @ice1000:

This is a programming language created by my friend Michael Lee, written in C++. The detailed description is on its website so I’ll just put some comments here. This is a C-like language (at least the function call syntax is of C style), while functions, structs, namespaces are ends with end like Ruby, and it has the concepts of package import using (the module system).
Its parser is hand-written (very complex, although parsers are trivial), which impressed me (I didn’t even think of that when working on Lice, I just wrote an AST evaluator).
This language supports invoking functions written in C++, like JNI.
CovScript mostly features its powerful standard library, which has database, GUI, web access, regular expressions.

About

Covariant Script Interpreter(Education Edition)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 92.5%
  • C 6.2%
  • Other 1.3%