1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-28 19:19:53 +00:00

Merge pull request #582 from sogaiu/tweak-parser-docs

Tweak parser docs
This commit is contained in:
Calvin Rose 2021-01-13 21:41:09 -06:00 committed by GitHub
commit 35c88d10cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1247,9 +1247,9 @@ static const JanetReg parse_cfuns[] = {
JDOC("(parser/status parser)\n\n" JDOC("(parser/status parser)\n\n"
"Gets the current status of the parser state machine. The status will " "Gets the current status of the parser state machine. The status will "
"be one of:\n\n" "be one of:\n\n"
"\t:pending - a value is being parsed.\n" "* :pending - a value is being parsed.\n\n"
"\t:error - a parsing error was encountered.\n" "* :error - a parsing error was encountered.\n\n"
"\t:root - the parser can either read more values or safely terminate.") "* :root - the parser can either read more values or safely terminate.")
}, },
{ {
"parser/flush", cfun_parse_flush, "parser/flush", cfun_parse_flush,
@ -1263,10 +1263,10 @@ static const JanetReg parse_cfuns[] = {
JDOC("(parser/state parser &opt key)\n\n" JDOC("(parser/state parser &opt key)\n\n"
"Returns a representation of the internal state of the parser. If a key is passed, " "Returns a representation of the internal state of the parser. If a key is passed, "
"only that information about the state is returned. Allowed keys are:\n\n" "only that information about the state is returned. Allowed keys are:\n\n"
"\t:delimiters - Each byte in the string represents a nested data structure. For example, " "* :delimiters - Each byte in the string represents a nested data structure. For example, "
"if the parser state is '([\"', then the parser is in the middle of parsing a " "if the parser state is '([\"', then the parser is in the middle of parsing a "
"string inside of square brackets inside parentheses. Can be used to augment a REPL prompt." "string inside of square brackets inside parentheses. Can be used to augment a REPL prompt.\n\n"
"\t:frames - Each table in the array represents a 'frame' in the parser state. Frames " "* :frames - Each table in the array represents a 'frame' in the parser state. Frames "
"contain information about the start of the expression being parsed as well as the " "contain information about the start of the expression being parsed as well as the "
"type of that expression and some type-specific information.") "type of that expression and some type-specific information.")
}, },