Commit Graph
855 Commits
Author SHA1 Message Date
Ganesan KaruppasamyandGitHub b53d7bdcfd Invoke the Deref function as needed for the function arguments. (#651) 2024-05-21 11:10:48 +02:00
Anton Medvedev c8b0171f3a Return tree on parse errors 2024-05-18 23:41:49 +02:00
Anton Medvedev 0d07afb7ae Add checker.ParseCheck func 2024-05-18 23:13:58 +02:00
Anton Medvedev 0a33193f26 Fix build for 386 and add build.yml workflow 2024-05-17 21:40:50 +02:00
Anton MedvedevandGitHub 19b2c3848f Add checks for nil before string casts in VM (#654) 2024-05-17 19:40:20 +02:00
Anton MedvedevandGitHub 696844a709 Refactor lexer (#653) 2024-05-17 18:10:26 +02:00
Anton Medvedev 71e349971e Add better error messages for index out of bounds errors 2024-05-12 11:55:15 +02:00
Anton Medvedev cea9c8ae86 Add int overflow checks 2024-05-09 17:22:41 +02:00
Anton Medvedev 7af1ec6a15 Improve now() and date() validation 2024-05-08 22:27:02 +02:00
Anton Medvedev 1ae9d68e8f Update docs 2024-05-08 22:20:37 +02:00
Anton Medvedev 77e80fe655 Remove implicit date's timezone set on parse 2024-05-08 10:04:54 +02:00
Anton Medvedev c2418bddaf Add go 1.22 to tests 2024-05-08 00:25:10 +02:00
Anton MedvedevandGitHub 68e3148c1f Vendor testify (#642) 2024-05-08 00:24:35 +02:00
Anton Medvedev c6cd675d6b Add default timezone option expr.Timezone() 2024-05-07 23:19:39 +02:00
Anton Medvedev 1659126046 Add timezone() builtin 2024-05-07 21:36:22 +02:00
Ganesan KaruppasamyandGitHub 36482dfa5a Resolve double-escaping issue with pair node key (#640)
* Resolve double-escaping issue with pair node key

* Resolve double-escaping issue with pair node key

* Added test cases for pair node key
2024-05-07 21:07:12 +02:00
Christian G. WardenandGitHub cb48887b9f Preserve The Specified Timezone In Parse (#633)
* Preserve The Specified Timezone In Parse

When parsing a string into a Time using the optional timezone
parameter, set the location of the Time to the timezone's location so
that Format uses that timezone.

* Add More Tests for Preserving Timezone

Add test when timezone is used to parse a date-time.

Add test when timezone is irrelevant because it's a date.
2024-04-24 14:08:49 +02:00
gnolizuhandGitHub be7ee98cb8 New usage case: xiaohongshu.com (#631)
add company usecase of xiaohongshu.com

Signed-off-by: gnolizuh <[email protected]>
2024-04-22 12:05:36 +02:00
Anton Medvedev 3ceff1cdb3 Fix printing on conditional/binary nodes
Fixes #613
2024-04-16 23:23:12 +02:00
Anton Medvedev c8f7d22462 Return proper nil from optional chain
Fixes #570
2024-04-16 23:11:01 +02:00
Anton Medvedev 199f26c7e3 Update sortBy docs 2024-04-14 08:56:31 +02:00
Anton Medvedev ba3bae5017 Add more optimizer tests 2024-04-13 23:50:53 +02:00
Anton Medvedev c5dfe3a811 Make count() predicate optional 2024-04-13 23:38:35 +02:00
Anton Medvedev d8d1d9ebf4 Code style 2024-04-13 23:18:59 +02:00
Anton Medvedev 8589d34039 Add sum([]) optimization 2024-04-13 23:16:08 +02:00
Anton Medvedev 27b20607f1 Add sum(map()) optimization 2024-04-13 22:50:11 +02:00
Anton MedvedevandGitHub 772eaba1ca Add predicate to sum() builtin (#592)
* Add predicate to sum() builtin

* go mod tidy
2024-04-13 15:37:02 +02:00
Anton Medvedev 01014b4c50 Merge compare-arrays 2024-04-13 10:11:06 +02:00
DaenneyandAnton Medvedev 1934e4eaee Make WithContext work for methods on env struct (#602)
This makes the WithContext patcher work when passing in a struct for an
env that has methods that take a context.

This is a bit fiddly because we can't quite detect the difference of
function vs. method on a struct, so we have to check both the first and
the second param. Since it's highly unusual to pass the context as
anything other than the first parameter, this should work out just fine
in practice.

Fixes #600.
2024-04-13 10:09:18 +02:00
SergeyandAnton Medvedev 2c460ecc98 Optimize boolean operations between all, any, none functions (#626) 2024-04-13 10:09:16 +02:00
Anton Medvedev 1fab6ed6e0 Revert "Optimize boolean operations between all, any, one, none functions (#555)" (#625)
This reverts commit 8037acf0bb.
2024-04-13 10:08:48 +02:00
needsureandAnton Medvedev 03af7491ad chore: fix some typos in conments (#622)
Signed-off-by: needsure <[email protected]>
2024-04-13 10:08:48 +02:00
Anton Medvedev 858f009587 Update README.md 2024-04-13 10:08:48 +02:00
Richard WoodingandAnton Medvedev 28060656f0 Update README.md (#619)
Add SPAN Digital as an user of expr
2024-04-13 10:08:48 +02:00
zhuliquanandAnton Medvedev 43556eecdd feat: extract code for compiling equal operator (#614) 2024-04-13 10:08:48 +02:00
Anton Medvedev 2ff83e8042 Better map ast printing 2024-04-13 10:08:48 +02:00
SergeyandAnton Medvedev db0054ab6f builtin int unwraps underlying int value (#611) 2024-04-13 10:08:48 +02:00
SergeyandAnton Medvedev 721b908494 expr.Operator passes before expr.Env caused error (#606) 2024-04-13 10:08:46 +02:00
Ganesan KaruppasamyandAnton Medvedev 527f3aacaf Fix -1 not in [] expressions (#590) 2024-04-13 10:08:10 +02:00
Ganesan KaruppasamyandAnton Medvedev 6fcc422765 Enable Support for Arrays in Sum, Mean, and Median Functions (#580) 2024-04-13 10:08:10 +02:00
Anton Medvedev 3dc373ec9a Add spans 2024-04-13 10:08:10 +02:00
SergeyandAnton Medvedev 2be09b2554 Support chzained comparisonc1 < 2 < 3 (#581) 2024-04-13 10:08:10 +02:00
DaenneyandGitHub 13451f69b4 Make WithContext work for methods on env struct (#602)
This makes the WithContext patcher work when passing in a struct for an
env that has methods that take a context.

This is a bit fiddly because we can't quite detect the difference of
function vs. method on a struct, so we have to check both the first and
the second param. Since it's highly unusual to pass the context as
anything other than the first parameter, this should work out just fine
in practice.

Fixes #600.
2024-04-12 22:54:01 +02:00
SergeyandGitHub 2835692a5f Optimize boolean operations between all, any, none functions (#626) 2024-04-12 18:49:41 +02:00
Anton MedvedevandGitHub 3205e4186b Revert "Optimize boolean operations between all, any, one, none functions (#555)" (#625)
This reverts commit 8037acf0bb.
2024-04-10 10:58:17 +02:00
needsureandGitHub c0d4644255 chore: fix some typos in conments (#622)
Signed-off-by: needsure <[email protected]>
2024-04-09 13:13:55 +02:00
Anton MedvedevandGitHub 4b2c15770d Update README.md 2024-04-09 09:47:41 +02:00
Richard WoodingandGitHub dc40f0eef6 Update README.md (#619)
Add SPAN Digital as an user of expr
2024-04-08 09:00:54 +02:00
zhuliquanandGitHub 62163f4450 feat: extract code for compiling equal operator (#614) 2024-03-28 14:37:51 +01:00
Anton Medvedev 9ca56a8aeb Better map ast printing 2024-03-27 09:26:56 +01:00