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

Support rasi config character type options #1131

Merged
merged 10 commits into from May 17, 2020

Conversation

jaki
Copy link
Contributor

@jaki jaki commented May 16, 2020

When trying to set matching-negate-character in a rasi config file,
the following warning shows

Option: matching-negate-char is not of a supported type: String.

This is because character types are not yet handled. Handle them from
the lexer all the way to xrm options. The format shall be single quotes
containing a single ASCII character (except newline) or certain escaped
character sequences, namely

  • \'
  • \0
  • \\

jaki added 10 commits May 15, 2020 00:38
Handle the `xrm_Char` case in the (rasi theme) config file parser.  This
should properly handle configuration like

```
matching-negate-char: "\0";
```

and

```
matching-negate-char: "-";
```
`mem` shouldn't ever be set when `XrmOption` is `type` `xrm_Char`.
Therefore, there is no need to check it and free it.  Remove that logic.
Add a `CHAR` token that takes things of the form `'<char>'` or some
specific backslash escape sequences like `'\''` and `'\0'`.  For now,
save it as a `T_STRING`.
Instead of using strings for property elements of type char, use
characters, which were recently added to the grammar.
@codecov-io
Copy link

codecov-io commented May 16, 2020

Codecov Report

Merging #1131 into next will decrease coverage by 0.01%.
The diff coverage is 20.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #1131      +/-   ##
==========================================
- Coverage   33.97%   33.96%   -0.02%     
==========================================
  Files          40       40              
  Lines       11522    11531       +9     
==========================================
+ Hits         3915     3916       +1     
- Misses       7607     7615       +8     
Impacted Files Coverage Δ
lexer/theme-parser.y 58.80% <0.00%> (-0.36%) ⬇️
source/xrmoptions.c 15.63% <14.28%> (-0.24%) ⬇️
lexer/theme-lexer.l 74.74% <100.00%> (+0.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ec65497...752fd09. Read the comment docs.

@DaveDavenport DaveDavenport merged commit a4c5a92 into davatorium:next May 17, 2020
@DaveDavenport
Copy link
Collaborator

thanks.

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants