extra: remove rest of 'word' names.
parent
75d63f8407
commit
b0ea2a0036
|
@ -4,23 +4,23 @@ USING: kernel strings math sequences lists.lazy words
|
|||
math.parser promises parser-combinators unicode.categories ;
|
||||
IN: parser-combinators.simple
|
||||
|
||||
: 'digit' ( -- parser )
|
||||
: digit-parser ( -- parser )
|
||||
[ digit? ] satisfy [ digit> ] <@ ;
|
||||
|
||||
: 'integer' ( -- parser )
|
||||
: integer-parser ( -- parser )
|
||||
[ digit? ] satisfy <*> [ string>number ] <@ ;
|
||||
|
||||
: 'string' ( -- parser )
|
||||
: string-parser ( -- parser )
|
||||
[ CHAR: " = ] satisfy
|
||||
[ CHAR: " = not ] satisfy <*> &>
|
||||
[ CHAR: " = ] satisfy <& [ >string ] <@ ;
|
||||
|
||||
: 'bold' ( -- parser )
|
||||
: bold-parser ( -- parser )
|
||||
"*" token
|
||||
[ CHAR: * = not ] satisfy <*> [ >string ] <@ &>
|
||||
"*" token <& ;
|
||||
|
||||
: 'italic' ( -- parser )
|
||||
: italic-parser ( -- parser )
|
||||
"_" token
|
||||
[ CHAR: _ = not ] satisfy <*> [ >string ] <@ &>
|
||||
"_" token <& ;
|
||||
|
|
|
@ -38,7 +38,7 @@ TUPLE: fjsc < dispatcher ;
|
|||
|
||||
: do-compile-url ( url -- response )
|
||||
[
|
||||
absolute-url http-get nip 'expression' parse
|
||||
absolute-url http-get nip expression-parser parse
|
||||
fjsc-compile write "();" write
|
||||
] with-string-writer
|
||||
<javascript-content> ;
|
||||
|
@ -59,7 +59,7 @@ TUPLE: fjsc < dispatcher ;
|
|||
|
||||
: do-compile ( code -- response )
|
||||
[
|
||||
'expression' parse fjsc-compile write
|
||||
expression-parser parse fjsc-compile write
|
||||
] with-string-writer
|
||||
<javascript-content> ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue