From e26277e6b7a9957b61ec13fbed284da6214681dc Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 30 Dec 2013 09:25:28 +0400 Subject: [PATCH] added word index description + some minor changes... Signed-off-by: Alex A. Naanou --- Slang/slang.html | 20 ++++++++++++++++---- Slang/slang.js | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Slang/slang.html b/Slang/slang.html index 91b8252..be434f9 100755 --- a/Slang/slang.html +++ b/Slang/slang.html @@ -59,7 +59,11 @@ font-family: monospace; } -.word[builtin=yes] { +.word[word-type=constant] { + font-weight: bold; + color: red; +} +.word[word-type=builtin] { font-style: italic; color: blue; } @@ -171,13 +175,16 @@ function showAvailableWords(){ }) .map(function(e){ var code = NAMESPACE[e] - var builtin = 'no' + var type if(code.constructor.name == 'Array'){ + type = 'word' code = stringifySlangCode(code) } else if(typeof(code) == typeof(function(){})){ - builtin = 'yes' + type = 'builtin' + } else { + type = 'constant' } - return ''+e+'' + return ''+e+'' }) .join(' ') } @@ -190,6 +197,11 @@ function showAvailableWords(){ Toggle bootstrap code view...

Available words

+

+ This section includes constants (red) ond constant-like + words (words that allways yield the same value), + built-in words (blue), and 2'nd gen words (black): +

Slang Console

diff --git a/Slang/slang.js b/Slang/slang.js index 5dd7eba..d79b15d 100755 --- a/Slang/slang.js +++ b/Slang/slang.js @@ -599,7 +599,7 @@ var BOOTSTRAP = [ //':: = ( a | b -- | ) [ 1 1 _swapN :: ]', '', '-- this is here for devel use only', -':: _clear ( ... -- ) [ s2b drop ] ', +':: _clear ( ... -- ) [ s2b print drop ] ', ':: _stack_size ( -- l ) [ s2b len swap b2s tor ] ', '', '',