extra: remove rest of 'word' names.

db4
Doug Coleman 2015-08-15 18:51:10 -07:00
parent 75d63f8407
commit b0ea2a0036
2 changed files with 7 additions and 7 deletions

View File

@ -4,23 +4,23 @@ USING: kernel strings math sequences lists.lazy words
math.parser promises parser-combinators unicode.categories ; math.parser promises parser-combinators unicode.categories ;
IN: parser-combinators.simple IN: parser-combinators.simple
: 'digit' ( -- parser ) : digit-parser ( -- parser )
[ digit? ] satisfy [ digit> ] <@ ; [ digit? ] satisfy [ digit> ] <@ ;
: 'integer' ( -- parser ) : integer-parser ( -- parser )
[ digit? ] satisfy <*> [ string>number ] <@ ; [ digit? ] satisfy <*> [ string>number ] <@ ;
: 'string' ( -- parser ) : string-parser ( -- parser )
[ CHAR: " = ] satisfy [ CHAR: " = ] satisfy
[ CHAR: " = not ] satisfy <*> &> [ CHAR: " = not ] satisfy <*> &>
[ CHAR: " = ] satisfy <& [ >string ] <@ ; [ CHAR: " = ] satisfy <& [ >string ] <@ ;
: 'bold' ( -- parser ) : bold-parser ( -- parser )
"*" token "*" token
[ CHAR: * = not ] satisfy <*> [ >string ] <@ &> [ CHAR: * = not ] satisfy <*> [ >string ] <@ &>
"*" token <& ; "*" token <& ;
: 'italic' ( -- parser ) : italic-parser ( -- parser )
"_" token "_" token
[ CHAR: _ = not ] satisfy <*> [ >string ] <@ &> [ CHAR: _ = not ] satisfy <*> [ >string ] <@ &>
"_" token <& ; "_" token <& ;

View File

@ -38,7 +38,7 @@ TUPLE: fjsc < dispatcher ;
: do-compile-url ( url -- response ) : do-compile-url ( url -- response )
[ [
absolute-url http-get nip 'expression' parse absolute-url http-get nip expression-parser parse
fjsc-compile write "();" write fjsc-compile write "();" write
] with-string-writer ] with-string-writer
<javascript-content> ; <javascript-content> ;
@ -59,7 +59,7 @@ TUPLE: fjsc < dispatcher ;
: do-compile ( code -- response ) : do-compile ( code -- response )
[ [
'expression' parse fjsc-compile write expression-parser parse fjsc-compile write
] with-string-writer ] with-string-writer
<javascript-content> ; <javascript-content> ;