7add882a7a
Prepare for writing all the runtime in Dart: - Move js runtime files to lib/runtime/dart (dart_runtime.js -> dart/_runtime.js), - Use rest params instead of arguments slicing in a couple of places. BUG=https://github.com/dart-lang/dev_compiler/issues/310 R=jmesserly@google.com Review URL: https://codereview.chromium.org/1413683006 .
18 lines
422 B
JavaScript
Executable File
18 lines
422 B
JavaScript
Executable File
dart_library.library('script', null, /* Imports */[
|
|
"dart/_runtime",
|
|
'dart/core'
|
|
], /* Lazy imports */[
|
|
], function(exports, dart, core) {
|
|
'use strict';
|
|
let dartx = dart.dartx;
|
|
function main(args) {
|
|
let name = args[dartx.join](' ');
|
|
if (name == '')
|
|
name = 'world';
|
|
core.print(`hello ${name}`);
|
|
}
|
|
dart.fn(main, dart.void, [core.List$(core.String)]);
|
|
// Exports:
|
|
exports.main = main;
|
|
});
|