Remove the lexer-factory because nothing uses it. Update usages.
parent
53c6d08b54
commit
dc0a921866
|
@ -364,7 +364,6 @@ IN: tools.deploy.shaker
|
||||||
compiler.crossref:generic-call-site-crossref
|
compiler.crossref:generic-call-site-crossref
|
||||||
compiler-impl
|
compiler-impl
|
||||||
compiler.errors:compiler-errors
|
compiler.errors:compiler-errors
|
||||||
lexer-factory
|
|
||||||
print-use-hook
|
print-use-hook
|
||||||
root-cache
|
root-cache
|
||||||
require-when-vocabs
|
require-when-vocabs
|
||||||
|
|
|
@ -104,10 +104,6 @@ HELP: with-lexer
|
||||||
{ $values { "lexer" lexer } { "quot" quotation } { "newquot" quotation } }
|
{ $values { "lexer" lexer } { "quot" quotation } { "newquot" quotation } }
|
||||||
{ $description "Calls the quotation with the " { $link lexer } " variable set to the given lexer. The quotation can make use of words such as " { $link scan-token } ". Any errors thrown by the quotation are wrapped in " { $link lexer-error } " instances." } ;
|
{ $description "Calls the quotation with the " { $link lexer } " variable set to the given lexer. The quotation can make use of words such as " { $link scan-token } ". Any errors thrown by the quotation are wrapped in " { $link lexer-error } " instances." } ;
|
||||||
|
|
||||||
HELP: lexer-factory
|
|
||||||
{ $var-description "A variable holding a quotation with stack effect " { $snippet "( lines -- lexer )" } ". This quotation is called by the parser to create " { $link lexer } " instances. This variable can be rebound to a quotation which outputs a custom tuple delegating to " { $link lexer } " to customize syntax." } ;
|
|
||||||
|
|
||||||
|
|
||||||
ARTICLE: "parser-lexer" "The lexer"
|
ARTICLE: "parser-lexer" "The lexer"
|
||||||
"A variable that encapsulate internal parser state:"
|
"A variable that encapsulate internal parser state:"
|
||||||
{ $subsections lexer }
|
{ $subsections lexer }
|
||||||
|
|
|
@ -150,7 +150,3 @@ M: lexer-error error-line [ error>> error-line ] [ line>> ] bi or ;
|
||||||
|
|
||||||
: with-lexer ( lexer quot -- newquot )
|
: with-lexer ( lexer quot -- newquot )
|
||||||
[ lexer set ] dip [ <lexer-error> rethrow ] recover ; inline
|
[ lexer set ] dip [ <lexer-error> rethrow ] recover ; inline
|
||||||
|
|
||||||
SYMBOL: lexer-factory
|
|
||||||
|
|
||||||
[ <lexer> ] lexer-factory set-global
|
|
||||||
|
|
|
@ -125,7 +125,7 @@ M: f parse-quotation \ ] parse-until >quotation ;
|
||||||
[ f parse-until >quotation ] with-lexer ;
|
[ f parse-until >quotation ] with-lexer ;
|
||||||
|
|
||||||
: parse-lines ( lines -- quot )
|
: parse-lines ( lines -- quot )
|
||||||
lexer-factory get call( lines -- lexer ) (parse-lines) ;
|
<lexer> (parse-lines) ;
|
||||||
|
|
||||||
: parse-literal ( accum end quot -- accum )
|
: parse-literal ( accum end quot -- accum )
|
||||||
[ parse-until ] dip call suffix! ; inline
|
[ parse-until ] dip call suffix! ; inline
|
||||||
|
|
Loading…
Reference in New Issue