Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

3 Commits

Repository files navigation

ExpressionScript

Code-as-data compiler for TypeScript.

Examples

To test out the examples, compile the project with:

tsc --target es5 src\compiler\compile.ts

Then run the compiler with:

node bin\cli examples\simple.q.ts

The input file simple.q.ts:

import{Expression,LambdaExpression,}from'../src/expressions/Expression';functionfoo<TFunctionextendsFunction>(f: LambdaExpression<TFunction>){console.log(f.compile()());}foo(<LambdaExpression<()=>number>>(()=>42));

Will be converted to the output file simple.ts:

import{Expression,LambdaExpression,}from'../src/expressions/Expression';functionfoo<TFunctionextendsFunction>(f: LambdaExpression<TFunction>){console.log(f.compile()());}foo(Expression.lambda<()=>number>(Expression.constant(42),[]));

About

Code-as-data compiler for TypeScript.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages