Skip to content

Parse negative integers appropriately #74

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

Merged
merged 2 commits into from
Oct 4, 2016
Merged

Parse negative integers appropriately #74

merged 2 commits into from
Oct 4, 2016

Conversation

wafflespeanut
Copy link
Contributor

Instead of parsing a token at some specified index, we can parse the immediately found literal. Also, this allows negative integers to be parsed as c_ints (which is required for some of the constants).

@wafflespeanut
Copy link
Contributor Author

It's necessary for including some constants from gfxFontConstants.h

@wafflespeanut
Copy link
Contributor Author

r? @emilio or @nox

@emilio
Copy link
Contributor

emilio commented Oct 4, 2016

Can you add a test for this? Adding a file under tests/headers/ and running make test should do it. Thanks!

@wafflespeanut
Copy link
Contributor Author

Alright, I've made the changes :)

bors-servo pushed a commit to servo/servo that referenced this pull request Oct 4, 2016
Add NS_FONT_STRETCH_* consts and regenerate bindings

<!-- Please describe your changes on the following line: -->

Depends on rust-lang/rust-bindgen#74

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build-geckolib` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because they're autogenerated

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Once that merges, r? @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/13566)
<!-- Reviewable:end -->
@emilio
Copy link
Contributor

emilio commented Oct 4, 2016

I think this is good to merge for now. IIRC upstream bindgen had integrated a C expression parser, so we might want to move to it.

Can you squash, then r=me?

@wafflespeanut
Copy link
Contributor Author

I've squashed the test commits, but I'd like to keep the first commit separately, since it makes changes to the code.

@bors-servo r=emilio

Thanks! :)

@bors-servo
Copy link

📌 Commit 7a39253 has been approved by emilio

@bors-servo
Copy link

⚡ Test exempted - status

@bors-servo bors-servo merged commit 7a39253 into master Oct 4, 2016
bors-servo pushed a commit that referenced this pull request Oct 4, 2016
Parse negative integers appropriately

Instead of parsing a token at some specified index, we can parse the immediately found literal. Also, this allows negative integers to be parsed as `c_int`s (which is required for some of the constants).
@wafflespeanut wafflespeanut deleted the int branch October 4, 2016 12:11
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Feb 4, 2017
…dings (from Wafflespeanut:consts); r=Manishearth

<!-- Please describe your changes on the following line: -->

Depends on rust-lang/rust-bindgen#74

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build-geckolib` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because they're autogenerated

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Once that merges, r? @Manishearth

Source-Repo: https://github.com/servo/servo
Source-Revision: 6f8bf29eaf3c495cd1c0a4d3bfcccd3c50938541
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 1, 2019
…dings (from Wafflespeanut:consts); r=Manishearth

<!-- Please describe your changes on the following line: -->

Depends on rust-lang/rust-bindgen#74

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build-geckolib` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because they're autogenerated

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Once that merges, r? Manishearth

Source-Repo: https://github.com/servo/servo
Source-Revision: 6f8bf29eaf3c495cd1c0a4d3bfcccd3c50938541

UltraBlame original commit: 975b16d01ec2e1f4d2c8e5f27da13fe6d24e68bd
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 1, 2019
…dings (from Wafflespeanut:consts); r=Manishearth

<!-- Please describe your changes on the following line: -->

Depends on rust-lang/rust-bindgen#74

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build-geckolib` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because they're autogenerated

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Once that merges, r? Manishearth

Source-Repo: https://github.com/servo/servo
Source-Revision: 6f8bf29eaf3c495cd1c0a4d3bfcccd3c50938541

UltraBlame original commit: 975b16d01ec2e1f4d2c8e5f27da13fe6d24e68bd
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 1, 2019
…dings (from Wafflespeanut:consts); r=Manishearth

<!-- Please describe your changes on the following line: -->

Depends on rust-lang/rust-bindgen#74

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build-geckolib` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because they're autogenerated

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Once that merges, r? Manishearth

Source-Repo: https://github.com/servo/servo
Source-Revision: 6f8bf29eaf3c495cd1c0a4d3bfcccd3c50938541

UltraBlame original commit: 975b16d01ec2e1f4d2c8e5f27da13fe6d24e68bd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants