Skip to content

Conversation

Amejonah1200
Copy link
Contributor

@Amejonah1200 Amejonah1200 commented Jul 26, 2022

What's new

  • Simple AST evaluation for literals in expressions
  • Ability to convert literals hex-dec-bin

TODO:

  • Remove conversions which are already in the code. Ex. 0x10 in code, remove 0x10 from the context menu.
  • Remove context for double if it's a literal
  • Add short and byte support
  • Fix int/long literals exceeding range and throwing Exception
    image

- AST Evaluation for Literals
- Ability to convert literals hex-dec-bin
@Amejonah1200 Amejonah1200 force-pushed the feature/constant-folding branch from 58e66df to 41229de Compare July 26, 2022 23:29
@Amejonah1200
Copy link
Contributor Author

No box type support will be given, as it also adds the need to evaluate Number#intValue() for example, which just way too much for this "simple" constant folding functionality.

@Amejonah1200 Amejonah1200 marked this pull request as ready for review July 27, 2022 23:42
@Amejonah1200 Amejonah1200 marked this pull request as draft July 28, 2022 00:10
public Expression getExpression() {
return expression;
}
}
Copy link
Owner

Choose a reason for hiding this comment

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

I can knock things like indentation/{} formatting out in the merge commit, but for reference we use \t

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, it has the old indentation in, forgot to reformat it.

@Col-E Col-E merged commit 9d17e10 into Col-E:dev3 Jul 28, 2022
@Col-E
Copy link
Owner

Col-E commented Jul 28, 2022

Very handy addition, merged 👍

@Col-E Col-E changed the title [WIP] Add constant folding context menu for literals Add constant folding context menu for literals Jul 28, 2022
@Amejonah1200 Amejonah1200 deleted the feature/constant-folding branch July 28, 2022 12:54
Repository owner deleted a comment from Amejonah1200 Jul 28, 2022
@Col-E
Copy link
Owner

Col-E commented Jul 28, 2022

1984 🙃👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants