Skip to content
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

Parse negative integers appropriately #74

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

@wafflespeanut wafflespeanut commented Oct 3, 2016

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

@wafflespeanut wafflespeanut commented Oct 3, 2016

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

@wafflespeanut
Copy link
Contributor Author

@wafflespeanut wafflespeanut commented Oct 3, 2016

r? @emilio or @nox

@emilio
Copy link
Collaborator

@emilio 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

@wafflespeanut wafflespeanut commented Oct 4, 2016

Alright, I've made the changes :)

bors-servo added a commit to servo/servo that referenced this issue 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
Collaborator

@emilio 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

@wafflespeanut wafflespeanut commented Oct 4, 2016

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
Contributor

@bors-servo bors-servo commented Oct 4, 2016

📌 Commit 7a39253 has been approved by emilio

@bors-servo
Copy link
Contributor

@bors-servo bors-servo commented Oct 4, 2016

Test exempted - status

@bors-servo bors-servo merged commit 7a39253 into master Oct 4, 2016
2 checks passed
bors-servo added a commit that referenced this issue 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 Oct 4, 2016
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue 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 issue 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 issue 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 issue 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
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants