mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Marko v3: Improved assertions
This commit is contained in:
parent
bd65a6566a
commit
8b51e818a3
@ -71,8 +71,9 @@ class Compiler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compile(src, filename) {
|
compile(src, filename) {
|
||||||
ok(src);
|
ok(typeof src === 'string', '"src" argument should be a string');
|
||||||
ok(filename);
|
ok(filename, '"filename" argument is required');
|
||||||
|
ok(typeof filename === 'string', '"filename" argument should be a string');
|
||||||
|
|
||||||
var context = new CompileContext(src, filename, this.builder);
|
var context = new CompileContext(src, filename, this.builder);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user