[add] Added package.d module.

This commit is contained in:
falsycat 2019-10-04 00:00:00 +00:00
parent 2858e30285
commit e7ebe7ddef

View File

@ -0,0 +1,25 @@
/// License: MIT
module sjscript;
import std.algorithm;
import dast.tokenize : Tokenize;
import sjscript.Token,
sjscript.parse,
sjscript.preprocess;
public {
import sjscript.Expression,
sjscript.ParametersBlock,
sjscript.exception;
}
///
ParametersBlock[] CreateScriptAst(string src) {
return src.
Tokenize!TokenType().
filter!(x => x.type != TokenType.Whitespace).
Preprocess().
Parse();
}