Skip to content

Conversation

teatwig
Copy link

@teatwig teatwig commented Mar 26, 2025

I encountered a similar issue as in #10 where creating a window rule like on created if app_id is "f.exe" then maximize would lead to the following error:

on created if app_id is "f.exe" then maximize
                        ^ Literal parser error. Text could not be converted to float. text:"f.exe"

This is because the lexer tries to parse the contents of encapsulated literals.

The only issue I can see with the solution is that it might not handle encapsulated character literals properly? Although I couldn't find a place where character literals are used.
Apart from that it doesn't really make sense to try to parse for example "false" as a boolean instead of a window with the title "false".

It might make sense to handle only literals encapsulated with " differently since at least the comments in lexer.hpp imply that it's supposed to be generic and there might eventually be a use case for encapsulated literals that aren't strings.

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.

1 participant