askql icon indicating copy to clipboard operation
askql copied to clipboard

Introduce an infix syntax for `div` and `mod`

Open czerwinskilukasz1 opened this issue 4 years ago • 1 comments

Following a discussion in another issue, we want to be able to write in AskScript expressions like:

7 = ((7 div 3) * 3) + (7 mod 3)

where div and mod are already existing resources for integer division and modulo respectively. We want to support it just for div and mod and not any other identifier.

Dear new contributor,

If you have any questions on how to start, please write a comment with a tag: @czerwinskilukasz1 or @mhagmajer, or join our Discord Community and let us know there. We will be very happy to help you start! :) Hint for now: This task requires changes in our parser grammar (askscript.grammar.pegjs file), which uses PEG.js syntax .

Cheers, Łukasz (@czerwinskilukasz1) AskQL Core Developer

czerwinskilukasz1 avatar Jul 26 '20 01:07 czerwinskilukasz1

Please note that https://github.com/xFAANG/askql/issues/250 and https://github.com/xFAANG/askql/issues/412 need to be implemented first.

czerwinskilukasz1 avatar Jul 26 '20 01:07 czerwinskilukasz1