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

Extend rule syntax #83

Merged
merged 5 commits into from
Jan 7, 2024
Merged

Extend rule syntax #83

merged 5 commits into from
Jan 7, 2024

Conversation

black-sliver
Copy link
Owner

@black-sliver black-sliver commented Jan 2, 2024

  • ^$func will call global Lua function func for AccessibilityLevel rather than bool/count. Possible return values are
    • AccessibilityLevel.None, replaces false (Red)
    • AccessibilityLevel.Normal, replaces true (Green)
    • AccessibilityLevel.SequenceBreak, replaces [] syntax (Yellow)
    • AccessibilityLevel.Inspect, replaces {} syntax (Blue)
  • parents are still evaluated so that e.g. SequenceBreak + Normal = SequenceBreak
  • allow defining access rule as single string, which is equivalent to [[string]], i.e. a single code or func.

to directly use an AccessibilityLevel returned from Lua, that is one of

* AccessibilityLevel.None
* AccessibilityLevel.Normal
* AccessibilityLevel.SequenceBreak
* AccessibilityLevel.Inspect
`"code"` behaves like `[["code"]]`
@black-sliver black-sliver force-pushed the lua-rules-accessibilitylevel branch from 676245d to 0af240a Compare January 7, 2024 11:18
@black-sliver black-sliver merged commit be15b10 into master Jan 7, 2024
7 checks passed
@black-sliver black-sliver deleted the lua-rules-accessibilitylevel branch January 7, 2024 11:29
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