clutchlang

所属分类:前端开发
开发工具:TypeScript
文件大小:0KB
下载次数:0
上传日期:2018-11-11 22:47:00
上 传 者sh-1993
说明:  一种面向表达式和面向对象的现代编程,编译为JavaScript。,
(An expression-oriented and object-oriented modern programming that compiles to JavaScript.,)

文件列表:
.coveralls.yml (46, 2018-11-11)
.prettierrc.json (125, 2018-11-11)
.travis.yml (404, 2018-11-11)
CONTRIBUTING.md (181, 2018-11-11)
LICENSE (1067, 2018-11-11)
docs/ (0, 2018-11-11)
docs/analysis.md (3973, 2018-11-11)
docs/const.md (1464, 2018-11-11)
docs/grammar.md (10047, 2018-11-11)
docs/meetings/ (0, 2018-11-11)
docs/meetings/2018-10-03.md (3131, 2018-11-11)
docs/modules.md (3064, 2018-11-11)
docs/semantics.md (7726, 2018-11-11)
examples/ (0, 2018-11-11)
examples/fibonacci.cl (55, 2018-11-11)
examples/fibonacci.cl.js (66, 2018-11-11)
examples/hello.cl (35, 2018-11-11)
examples/hello.cl.js (58, 2018-11-11)
jest.config.js (270, 2018-11-11)
package.json (1234, 2018-11-11)
src/ (0, 2018-11-11)
src/agnostic/ (0, 2018-11-11)
src/agnostic/errors.ts (802, 2018-11-11)
src/agnostic/scanner.ts (8590, 2018-11-11)
src/agnostic/strings.ts (3843, 2018-11-11)
src/cli/ (0, 2018-11-11)
src/cli/entrypoint.ts (3525, 2018-11-11)
src/language/ (0, 2018-11-11)
src/language/ast/ (0, 2018-11-11)
src/language/ast/lexer.ts (66, 2018-11-11)
src/language/ast/lexer/ (0, 2018-11-11)
src/language/ast/lexer/token.ts (9373, 2018-11-11)
src/language/ast/lexer/tokenizer.ts (10748, 2018-11-11)
src/language/ast/message.ts (71, 2018-11-11)
src/language/ast/message/ (0, 2018-11-11)
src/language/ast/message/message.ts (2132, 2018-11-11)
src/language/ast/message/reporter.ts (1029, 2018-11-11)
src/language/ast/parser.ts (239, 2018-11-11)
... ...

![Clutch Logo](https://user-images.githubusercontent.com/168174/45592313-6d608680-b91e-11e8-8edd-f12ee6e74824.png) [![Build Status](https://travis-ci.org/clutchlang/clutchlang.svg?branch=master)][1] [![Coverage Status](https://coveralls.io/repos/github/clutchlang/clutchlang/badge.svg?branch=master)][2] [![License is MIT](https://img.shields.io/github/license/mashape/apistatus.svg)][3] [1]: https://travis-ci.org/clutchlang/clutchlang [2]: https://coveralls.io/github/clutchlang/clutchlang?branch=master [3]: https://choosealicense.com/licenses/mit/ # Clutch _Clutch_ is an expression-oriented and object-oriented modern programming that compiles to JavaScript. ```js // fib(n) -> if n < 2 then n else fib(n - 1) + fib(n - 2) function fib(n) { return n < 2 ? n : fib(n - 1) + fib(n - 2); } ``` _Clutch_'s goals: * Make functional programming a delight but keep aproachable to traditional use * Defaults that prefer immutability and optimizations * Low overhead compilation and interpoability to and with JavaScript **STATUS**: _Highly experimental_. Currently is a [CoffeScript][1]-like tool that does a 1:1 transpilation of most of Clutch's syntax to the equivalent in JavaScript. The goal, of course, is to become a complete static language, so we are pretty far from that! [1]: https://coffeescript.org/ ## Running There is a simple script, `npm run clc`, which supports an experimental CLI: ```bash # Compiles and outputs path/to/file.cl.js $ npm run clc -- path/to/file.cl ``` To print the debug AST tree instead of JavaScript, add `--parse` or `-p`: ```bash # Prints to stdout $ npm run clc -- path/to/file.cl -p ``` To run in _worker-mode_, i.e. run the CLI and continously receive input: ```bash # Write on stdin. Two newline characters triggers a compile $ npm run clc -- -w ``` ## Learn more * [Grammar](docs/grammar.md) * [Semantics](docs/semantics.md)

近期下载者

相关文件


收藏者