c272 / iro4cli

An open-source rewrite of Iro, a grammar generator, supporting automatic VSCode & Atom extension generation.
GNU General Public License v3.0
35 stars 5 forks source link

hex color codes error #15

Closed pfgithub closed 1 year ago

pfgithub commented 1 year ago

Using hex color codes causes "invalid statement provided"

.comment : style {
   color                 = #aaffaa
   color                 = "#aaffaa"; // doesn't work either
   textmate_scope        = comment
}
Example file with error ```iro ################################################################# ## Iro ################################################################ ## ## * Press Ctrl + '+'/'-' To Zoom in ## * Press Ctrl + S to save and recalculate... ## * Documents are saved to web storage. ## * Only one save slot supported. ## * Matches cannot span lines. ## * Unicode chars must be defined in \u0000 to \uffff format. ## * All matches must be contained by a single group ( ... ) ## * Look behinds not permitted, (?<= or (?

Error:

line 40:25 extraneous input '=' expecting {'[]', '}', ':', IDENTIFIER}
[ERROR] Line 40 - Invalid statement provided, unrecognized.
svallory commented 1 year ago

@pfgithub try without the #

pfgithub commented 1 year ago

Iro doesn't allow this:

Color must be privded as a color alias (such as white, red, black, blue, green), or a hexidecimal REG color in the format #000 - #fff or #000000 - #ffffff

svallory commented 1 year ago

You are correct, @pfgithub. But I removed the # and it worked. It is a bug.

c272 commented 1 year ago

Sorry for the late response to this issue, it seemed to slip past my notifications. I've just added support for this in the latest master, it'll be in a release with a few other fixes fairly soon.