Starting library

This commit is contained in:
Devine Lu Linvega 2019-07-13 11:43:50 +09:00
parent cfc30f518e
commit 7b14b94c58
4 changed files with 10 additions and 4 deletions

View File

@ -40,6 +40,9 @@
ronin.controller.addRole('default', 'Edit', 'delete') ronin.controller.addRole('default', 'Edit', 'delete')
ronin.controller.addRole('default', 'Edit', 'selectall') ronin.controller.addRole('default', 'Edit', 'selectall')
ronin.controller.add("default","Project","Run",() => { ronin.commander.run(); },"CmdOrCtrl+R");
ronin.controller.commit(); ronin.controller.commit();
ronin.install(document.body); ronin.install(document.body);

View File

@ -32,10 +32,12 @@ function Commander (ronin) {
this._status.textContent = 'Idle, RUN(cmd+enter).' this._status.textContent = 'Idle, RUN(cmd+enter).'
this._input.focus() this._input.focus()
this.run()
} }
this.run = function (txt = this.el.value) { this.run = function (txt = this._input.value) {
console.log(new Lisp(txt, ronin.library)) const inter = new Lisp(txt, ronin.library)
console.log(inter.toPixels())
} }
this.update = function () { this.update = function () {

View File

@ -1,5 +1,5 @@
function Library (ronin) { function Library (ronin) {
this.hello = function () { this.clear = function () {
console.log('clear')
} }
} }

View File

@ -94,6 +94,7 @@ function Lisp (input, lib) {
} }
this.toPixels = function () { this.toPixels = function () {
console.log(input)
return interpret(this.parse(input)) return interpret(this.parse(input))
} }
} }