-
Notifications
You must be signed in to change notification settings - Fork 66
Space or no-space in expressions #115
Comments
Hello :-), I don't think there is any difference. Both should be supported. |
@Hywan thants for the quick reply. It renders different models $model->expression =
$model->{'='}(
$model->variable('method'),
'POST'
); $model = new \Hoa\Ruler\Model();
$model->expression =
$model->variable('method="POST"'); |
@Hywan i should mention, we are not using ruler to execute, but we are visiting the AST ourselves to convert it into Elasticsearch query. |
Indeed, I can reproduce the bug. I don't have right now to fix it, but probably on Friday. Is it working for you? |
I suppose I know how to fix that. |
@Hywan don't worry or feel the need to commit to a time frame, i have a "workaround" for now :-) |
The trick is easy actually: Line 67 in 28174ca
We must change the token to be: - %token identifier [^\s\(\)\[\],\.]+
+ %token identifier [^\s\(\)\[\],\.=]+ We should include also common operators. That's because an identifier can be anything. |
I tried to copy the grammar with the small change, but it leads to a new error:
|
Sorry, had to fix other higher priority bugs. I'll come back to you as soon as possible :-). |
Sorry, had to fix other higher priority bugs. I'll come back to you as soon as possible :-). Try with:
The problem is that both the operands and the operator are represented by the |
It is a difference to have
foo="bar"
orfoo = "bar"
when evaluating this grammar. Is there a way to have both the same?The text was updated successfully, but these errors were encountered: