Skip to content

Conversation

@AtomCrafty
Copy link
Contributor

Completely rewrote value converters responsible for parsing integer literals as TypedBigInteger instances.
Apart from implementation details, these are the behavioral changes:

  • Verilog-style literals now support underscores to separate groups of digits
  • Signed Verilog-style literals now provide negative values when the sign bit is set
  • Verilog-style literals will now generate diagnostics if the value's bit pattern does not fit within the specified width

Closes #104

@AtomCrafty AtomCrafty requested a review from eyck November 25, 2023 20:38

static def <T extends EObject> Iterator<T> descendantsOfType(EObject obj, Class<T> type) {
return obj.eAllContents.filter(type);
static def <T extends EObject> List<T> descendantsOfType(EObject obj, Class<T> type) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a particular reason to switch to List?

Copy link
Contributor Author

@AtomCrafty AtomCrafty Nov 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why this was ever Iterator. If anything, it should have been Iterable. We want to return something you can iterate over, not the iterator itself. Unfortunately eAllContents is a single-use iterator, so to make it iterable we need to collect it into a list.

@eyck eyck merged commit 7de134b into develop Nov 26, 2023
@AtomCrafty AtomCrafty deleted the integer-literals branch December 1, 2023 15:07
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.

3 participants