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

Improve/color syntax improvements #96

Merged
merged 4 commits into from
Feb 19, 2021
Merged

Conversation

Mwexim
Copy link
Owner

@Mwexim Mwexim commented Feb 6, 2021

This pull request aims to fix the mess I added in #82. The syntax was odd, the behaviour not flexible enough and overall the features were limited.

  • Removed the literal parsing for hex colours. You'll need to write color from hex "ff0000" instead of &ff0000
  • Rewrote the comment parsing mechanism and made sure you can now use color codes together with hashtags.
    • For example: color from hex "#ffff00" would've thrown an error previously, but now it doesn't because the hashtag is followed by a valid colour code. This seems very unnecessary now, but I am planning to add some tag syntax for colours in the future that could use this.
    • Other behaviour remains the same.
  • Added support for the 'alpha' value in RGBA (transparency).
  • Added support for 3-digit hex values (and 8-digit hex values as well).
  • Changed the ExprColorFromRGB pattern to take in a list of integers. I feel this is a lot more intuitive than the other pattern.
  • Made FileParser#parseFileLines static (why was this not the case?)
  • Fixed some tests

I am planning to release a notable design update for 0.2, which will merge the parsing of multiline tokens and comments into one structure.

@Mwexim Mwexim merged commit c81e5f3 into master Feb 19, 2021
@Mwexim Mwexim deleted the improve/color-syntax-improvements branch February 19, 2021 20:16
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.

2 participants