Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUse the ParserContext along with the Parser #14373
Conversation
highfive
commented
Nov 26, 2016
|
Heads up! This PR modifies the following files:
|
highfive
commented
Nov 26, 2016
|
Looks good I guess, I'm kind of sad to see all those @bors-servo r+ |
|
|
Use the ParserContext along with the Parser <!-- Please describe your changes on the following line: --> This changes the `parse` function's signature to include `ParserContext`, so that we don't introduce another trait just for the sake of the context. Instead, we can safely ignore the context whenever we don't need it. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors <!-- Either: --> - [x] These changes do not require tests because it's a refactor <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> r? @SimonSapin or @emilio or @Manishearth <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14373) <!-- Reviewable:end -->
|
Thanks! :) |
|
@bors-servo r- Oops. I've missed something. |
|
Forgot to update the tests...
|
|
Heh, good luck with those, most should be from macros so shouldn't be that much, hopefully. r=me when those are fixed. |
|
@bors-servo r=emilio |
|
|
|
I don't really agree with this. It's pretty easy to introduce two traits where one trait delegates to another when there's no context. But it's fine, I guess. |
Use the ParserContext along with the Parser <!-- Please describe your changes on the following line: --> This changes the `parse` function's signature to include `ParserContext`, so that we don't introduce another trait just for the sake of the context. Instead, we can safely ignore the context whenever we don't need it. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors <!-- Either: --> - [x] These changes do not require tests because it's a refactor <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> r? @SimonSapin or @emilio or @Manishearth <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14373) <!-- Reviewable:end -->
|
|
Yes, that's what @emilio had suggested earlier. I thought it'd be better to have an unused argument in the function instead of introducing another trait. We're complicating things by introducing more things, which could otherwise be solved by a refactor. |
|
Looks like the latest merge has affected my PR. Hmph. |
|
@bors-servo r=emilio |
|
|
Use the ParserContext along with the Parser <!-- Please describe your changes on the following line: --> This changes the `parse` function's signature to include `ParserContext`, so that we don't introduce another trait just for the sake of the context. Instead, we can safely ignore the context whenever we don't need it. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors <!-- Either: --> - [x] These changes do not require tests because it's a refactor <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> r? @SimonSapin or @emilio or @Manishearth <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14373) <!-- Reviewable:end -->
|
|
|
@bors-servo retry #14317 |
|
|
|
|
highfive
commented
Nov 27, 2016
|
|
@bors-servo retry #14026 |
|
|
|
|
wafflespeanut commentedNov 26, 2016
•
edited
This changes the
parsefunction's signature to includeParserContext, so that we don't introduce another trait just for the sake of the context. Instead, we can safely ignore the context whenever we don't need it../mach build -ddoes not report any errors./mach test-tidydoes not report any errorsr? @SimonSapin or @emilio or @Manishearth
This change is