[add] Added package.d module.
This commit is contained in:
parent
2858e30285
commit
e7ebe7ddef
25
sjscript/src/sjscript/package.d
Normal file
25
sjscript/src/sjscript/package.d
Normal 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();
|
||||
}
|
Reference in New Issue
Block a user