Mercurial > repos > tabletprog
changeset 105:35006a6e1c47
Fixed more editor coderot and improved syntax/selection coloring a bit.
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 11 Apr 2013 09:16:35 -0700 |
parents | 648659961e0e |
children | 76a21129e8f5 |
files | editor.css editor.js index.html src/editor.tp |
diffstat | 4 files changed, 15 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/editor.css Thu Apr 11 00:12:21 2013 -0700 +++ b/editor.css Thu Apr 11 09:16:35 2013 -0700 @@ -44,7 +44,7 @@ #src .selected { - background-color: yellow; + background-color: #FFFFB0; } #editor @@ -200,6 +200,16 @@ color: #FF1030; } +.funpart +{ + color: #108030; +} + +.args +{ + color: #1030C0; +} + .op > div { display: inline-block;
--- a/editor.js Thu Apr 11 00:12:21 2013 -0700 +++ b/editor.js Thu Apr 11 09:16:35 2013 -0700 @@ -97,7 +97,7 @@ textContent: parts[i] + (this.receiver && parts.length == 1 ? '' : ':'), className: 'funpart', onclick: function(event) { - mainModule.funClick(this, astNode, event); + main_module.funClick(this, astNode, event); }})); if (this.args[i]) { this.args[i].toHTML(base); @@ -116,7 +116,7 @@ className: 'symbol', textContent: this.name, onclick: function(event) { - mainModule.symbolClick(this, astNode, event); + main_module.symbolClick(this, astNode, event); } })); }
--- a/index.html Thu Apr 11 00:12:21 2013 -0700 +++ b/index.html Thu Apr 11 09:16:35 2013 -0700 @@ -21,7 +21,7 @@ <div id="editor"> <div class="controls"> <ul id="inscope"></ul> - </div><div id="src"></div><div class="controls"> + </div><div id="src"></div><div class="controls showops"> <ul id="operators"> <li><</li> <li>></li>
--- a/src/editor.tp Thu Apr 11 00:12:21 2013 -0700 +++ b/src/editor.tp Thu Apr 11 09:16:35 2013 -0700 @@ -76,9 +76,8 @@ } symbolClick <- :domnode astnode event { - console log: astnode selectNode: domnode - popInscope: ((astnode symbols) allSymbols) onClick: :key { + popInscope: ((astnode symbols) allSymbols: (foreign: undefined)) onClick: :key { domnode textContent!: key astnode name!: key }