<commit_before>USING: help.markup help.syntax locals locals.types quotations strings
vocabs.parser ;
IN: locals.parser

HELP: in-lambda?
{ $var-description { $link t } " if we're currently parsing a lambda with lexical variables." } ;

HELP: parse-def
{ $values
  { "name/paren" string }
  { "def" "a " { $link def } " or a " { $link multi-def } }
}
{ $description "Parses the lexical variable bindings following a " { $link \ :> } " token." } ;

HELP: with-lambda-scope
{ $values { "assoc" "local variables" } { "reader-quot" quotation } { "quot" quotation } }
{ $description "Runs the quotation in a lambda scope. That means that any local variables are available for lookup in the " { $link manifest } ", but are cleaned up after the quotation finishes." } ;

ARTICLE: "locals.parser" "Utility words used by locals parsing words"
"Words for parsing local words."
$nl
"Words for parsing variable assignments:"
{ $subsections parse-def parse-multi-def parse-single-def }
"Parsers for word and method definitions:"
{ $subsections (::) (M::) } ;

ABOUT: "locals.parser"<commit_msg>locals.parser: fix docs.<commit_after>USING: help.markup help.syntax locals locals.types quotations strings
vocabs.parser ;
IN: locals.parser

HELP: in-lambda?
{ $var-description { $link t } " if we're currently parsing a lambda with lexical variables." } ;

HELP: parse-def
{ $values
  { "name/paren" string }
  { "def" "a " { $link def } " or a " { $link multi-def } }
}
{ $description "Parses the lexical variable bindings following a " { $link POSTPONE: :> } " token." } ;

HELP: with-lambda-scope
{ $values { "assoc" "local variables" } { "reader-quot" quotation } { "quot" quotation } }
{ $description "Runs the quotation in a lambda scope. That means that any local variables are available for lookup in the " { $link manifest } ", but are cleaned up after the quotation finishes." } ;

ARTICLE: "locals.parser" "Utility words used by locals parsing words"
"Words for parsing local words."
$nl
"Words for parsing variable assignments:"
{ $subsections parse-def parse-multi-def parse-single-def }
"Parsers for word and method definitions:"
{ $subsections (::) (M::) } ;

ABOUT: "locals.parser"
{'fraction_non_alphanumeric': 0.13079394217530976, 'fraction_numerical': 0.0, 'mean_word_length': 4.265700483091788, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3384029', 'n_tokens_mistral': 698, 'n_tokens_neox': 665, 'n_words': 244}