Applied suggestions to other files' documentation

This commit is contained in:
Real-Septicake 2024-04-09 13:33:01 -04:00
parent 81b70aefc7
commit 488444ccbf
2 changed files with 7 additions and 7 deletions

View file

@ -11,7 +11,7 @@ export type FullParserOpts = {
}; };
/** /**
* A function that parses through the input plaintext with the full parser and returns the AST representing the * A function that parses through the input text with the full parser and returns the AST representing the
* result. * result.
* *
* @param input The input string to parse. * @param input The input string to parse.
@ -29,7 +29,7 @@ export function fullParser(input: string, opts: FullParserOpts): M.MfmNode[] {
} }
/** /**
* A function that parses through the input plaintext with the simple parser and returns the AST representing the * A function that parses through the input text with the simple parser and returns the AST representing the
* result. * result.
* *
* @param input The input string to parse. * @param input The input string to parse.

View file

@ -21,15 +21,15 @@ const newLine = P.alt([P.crlf, P.cr, P.lf]);
/** /**
* A function that returns a {@link P.Parser Parser} which goes through the supplied parsers sequentially. * A function that returns a {@link P.Parser Parser} which goes through the supplied parsers sequentially.
* If the first provided parser fails, a {@link P.Failure Failure} object is returned, the plaintext of the * If the first provided parser fails, a {@link P.Failure Failure} object is returned, the matched portion of the
* successfully parsed portion of the input if any other parsers fail, and an array of the values of the * input text is returned if any other parsers fail, and an array of the values of the parsers'
* parsers' {@link P.Success Successes}. * {@link P.Success Successes}.
* *
* @param parsers The list of {@link P.Parser Parsers} to use. * @param parsers The list of {@link P.Parser Parsers} to use.
* @returns A {@link P.Parser Parser} that goes through the supplied parsers sequentially and makes sure that each * @returns A {@link P.Parser Parser} that goes through the supplied parsers sequentially and makes sure that each
* succeeds. If the first parser fails, a {@link P.Failure Failure} object is returned. If any other parser * succeeds. If the first parser fails, a {@link P.Failure Failure} object is returned. If any other parser
* fails, the plaintext of the successfully parsed portion of the input text is returned. If all succeed, * fails, the matched portion of the input text is returned. If all succeed, the array of each
* the array of each {@link P.Success Success'} value is returned. * {@link P.Success Success'} value is returned.
*/ */
function seqOrText(parsers: P.Parser<any>[]): P.Parser<any[] | string> { function seqOrText(parsers: P.Parser<any>[]): P.Parser<any[] | string> {
return new P.Parser<any[] | string>((input, index, state) => { return new P.Parser<any[] | string>((input, index, state) => {