Skip to content
프로젝트

소개

표현력과 타입 안전성에 중점을 둔 인터프리터 언어입니다. (https://gitlab.com/fascinatedbox/lily의 미러입니다.)

프로그래밍 언어 및 런타임

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
-1
in 15 days
-2
in 1 month
-1

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original
Lily Logo

Discord Pipeline Status Windows Build Coverage Report

Lily

Lily is a programming language focused on expressiveness and type safety.

Sample

enum Color { Black, Blue, Cyan, Green, Magenta, Red, White, Yellow }

class Terminal(public var @foreground: Color, width_str: String)
{
    public var @width = width_str.parse_i().unwrap_or(80)

    public define set_fg(new_color: Color) {
        @foreground = new_color
    }
}

var terms = [Terminal(Color.White, "A"), Terminal(.Red, "40")]

terms.each(|e| e.width += 20 )
     |> print

Features

Embeddable

Lily may be a statically-typed language, but the reference implementation is an interpreter. The interpreter as well as its API have been carefully designed with sandboxing in mind. As a result, it's possible to have multiple interpreters exist alongside each other.

Shorter edit cycle

Another benefit from having the reference implementation as an interpreter is a shorter turn around time. The interpreter's parser is comparable in speed to that of languages using an interpreter as their reference.

Building

You need a C compiler (C11+) and CMake (3.10+). There are no external dependencies.

To build Lily, execute the following in a terminal:

cmake .
cmake --build .

Note: Windows users may need to add -G"Unix Makefiles" to the end of the cmake invocation.

The above will build the lily executable, as well as a liblily that you can use with your program. It also builds pre-commit-tests.

Running tests

The centerpiece of Lily's testing is test_main.lily in the test directory. That file imports and invokes a large number of tests that cover a lot of Lily.

The make command also builds covlib and pre-commit-tests. No additional commands are necessary. covlib is a library that tests some parts of Lily that native code can't test. pre-commit-tests is a special runner that executes test_main.lily.

To run Lily's tests, execute pre-commit-tests from the directory it's in after building Lily.

Resources

Packaging

The lily-garden repository contains a package manager (Garden) that simplifies the install of Lily packages.

License

MIT

관련 프로젝트 살펴보기

불러오는 중…