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

dynamic raise statement - resolves #15 #460

Merged
merged 2 commits into from
Aug 6, 2019
Merged

dynamic raise statement - resolves #15 #460

merged 2 commits into from
Aug 6, 2019

Conversation

farskipper
Copy link
Member

Adding new syntax for raise statements that allow a dynamic expression for the event domain

Original statement:
raise <word> event <expression> [for <expression>] [attributes <expression>]

New additional syntax:
raise event <expression> [for <expression>] [attributes <expression>]

For example:

raise foo event "bar"
// - or -
raise event "foo:bar"

raise event <expression> : <expression> and raise event <expression> <expression> both had parser ambiguities, that's why there is a single expression for both the domain and type.

The domain-type expression is evaluated to a string (using KRL's toString logic) then the domain and type are parsed out separated by a :

@b1conrad
Copy link
Member

b1conrad commented Aug 6, 2019

Looks great! Thanks, Matthew

@farskipper farskipper merged commit 67bba1e into master Aug 6, 2019
@farskipper farskipper deleted the dynamic-raise branch August 6, 2019 18:58
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