diff --git a/sjscript/src/sjscript/package.d b/sjscript/src/sjscript/package.d new file mode 100644 index 0000000..4946b9c --- /dev/null +++ b/sjscript/src/sjscript/package.d @@ -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(); +}