tree-sitter-bash icon indicating copy to clipboard operation
tree-sitter-bash copied to clipboard

Failed to parse expression 'echo $(((duedatesec-todaysec)/86400))'

Open paapereira opened this issue 4 years ago • 4 comments

I'm getting a "Failed to parse expression" in a shell script while calculating the number days between two dates in seconds.

The expression and the shell script execute without any errors.

It was suggested to me that this may be a tree-sitter issue. If it is not I'm sorry in advance.

image

paapereira avatar Jun 02 '20 09:06 paapereira

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.67. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

issue-label-bot[bot] avatar Jun 02 '20 09:06 issue-label-bot[bot]

@paapereira I tried the snippet provided. it looks like duedatesec-todaysec is considered a single node. When I separate them with spaces duedatesec - todaysec. I get the correct parsing.

TravonteD avatar Jul 21 '20 13:07 TravonteD

Sorry, I'm having the same message. Did you do it like this?

2020-07-21_20-31

paapereira avatar Jul 21 '20 19:07 paapereira

yes that's exactly what I did. Can you give more information about your setup? Maybe that would shed some light on possible causes

TravonteD avatar Jul 21 '20 20:07 TravonteD