-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
public API changes #640
Comments
This was referenced Jan 2, 2024
5 tasks
github-merge-queue bot
pushed a commit
that referenced
this issue
Jan 12, 2024
…rsing (#733) Checks boxes in #640 #638 This adapts `ParserFunction` to always attempt parsing the leading trivia after we had a succesful match. This has a nice side benefit of not overwriting tokens that would allow for more progress when collecting the final trivia (unlike previous [AttemptedParseRule, EndOfFileTrivia] sequence). I'm not so happy with the resulting tree shape, however; IMO we should either: 1. return a "tree" that has both parents - the first one being the expected parsed rule node but also the second parent being the "leading trivia" 2. or at least introduce a notion of a virtual EndOfFile token that this final end-of-file trivia can belong to. Otherwise, a lone, final LeadingTrivia child belonging to the rule node seems misplaced and it's not intuitive for me to find the remaining trivia in that place. I'm open for other suggestions!
This was referenced Feb 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
as discussed in #617:
ProductionKind
completely, since it is no longer needed. We only need to exposefn parse(NonTerminalKind)
: Clean up precedence parser codegen since DSL v2 #699TokenKind
toTerminalKind
, since it will also refer to trivia. (Consider Rule/Token => Nonterminal/Terminal rename #834)RuleKind
toNonTerminalKind
, since "rule" is ambiguous. (Consider Rule/Token => Nonterminal/Terminal rename #834)TerminalKind::SKIPPED
fromTerminalKind
, and add newNode::Unrecognized(string)
andNode::Missing(kind)
variants instead. (Distinguish between unrecognized and missing input in the CST when recovering parse #835)LexicalContext
andfn scan(TokenKind)
from the public API: Hide Lexer-related facilities from the public API #728EndOFFileTrivia
no longer exists,ParseResult
should collect any remaining trivia at the end of the input, and include it in theParseResult
returned, for any kind of non-terminal, not justSourceUnit
.RuleKind
for it #737The text was updated successfully, but these errors were encountered: