Commit Graph
22 Commits
Author SHA1 Message Date
Anton Medvedev 564822e8f3 Add examples testing 2025-03-21 18:09:09 +01:00
Anton Medvedev 61219e089c Update examples.txt 2025-03-19 15:29:59 +01:00
Anton Medvedev 80eb95bf5f Make sure get() returns nil for map[string]string on missing keys
Fixes #723
2025-03-08 17:28:39 +01:00
Anton Medvedev 7e417b043e Add -update flag to gen tests 2025-03-08 15:40:47 +01:00
Anton MedvedevandGitHub fee5690347 Refactor checker to use Nature (#665)
This PR introduces a new concept inside Expr's type checker - Nature.

It's an abstraction other reflect.Type which carries additional information about possible type, methods and builtin function.

I was able to find and fix a few bugs in type checker and optimizer. Implementation of nature concept has proven itself. As well nature will allow to bring more feature for type checker in future.

Why Nature? I was looking for a name to replace Type. Type name already carries much information, as well can be confused with reflect.Type. Nature name should be understood as "nature of the node", same as "type of the node".
2024-06-01 00:09:22 +02:00
Anton MedvedevandGitHub 696844a709 Refactor lexer (#653) 2024-05-17 18:10:26 +02:00
Anton Medvedev c6cd675d6b Add default timezone option expr.Timezone() 2024-05-07 23:19:39 +02:00
Anton Medvedev c8f7d22462 Return proper nil from optional chain
Fixes #570
2024-04-16 23:11:01 +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
Ganesan KaruppasamyandGitHub 2f8f25a68d Enhanced min and max built-in functions to Support Arrays of Integers and Floats (#576)
* Enhanced min and max built-in functions to Support Arrays of Integers and Floats

* Enhanced min and max built-in functions to Support Arrays of Integers and Floats
2024-02-24 21:12:51 +01:00
Anton Medvedev 35fc6ee22b Update examples.txt 2023-12-29 23:01:52 +01:00
Anton Medvedev 885c769c65 Fix type checker for float arguments
Fixes #474
2023-11-24 16:50:09 +01:00
Anton Medvedev 63496e6fe7 Add type checks for 42 in ["a"] as invalid 2023-09-20 14:00:15 +02:00
Anton Medvedev 41f503e813 Update test gen 2023-08-29 10:44:53 +02:00
Anton Medvedev 1963e72aac Move fuzz 2023-08-23 14:40:33 +02:00
Anton Medvedev 0961580bf0 Add fuzz_expr_seed_corpus.zip 2023-08-20 18:12:47 +02:00
Anton Medvedev 67940a9ed8 Add fuzz dict and corpus 2023-08-20 18:11:33 +02:00
Anton Medvedev f909866204 Remove invalid tests 2023-08-19 22:45:50 +02:00
Anton Medvedev bf10f7e3bb Add crowdsec testdata 2023-08-18 22:08:19 +02:00
Anton Medvedev b4a6a4c7fc Add gen test 2023-08-18 15:17:20 +02:00
Anton Medvedev aec4502274 Update fuzz_test.go 2023-08-18 12:43:27 +02:00
Anton Medvedev a1961be5fa Add fuzz testing 2023-08-18 01:34:16 +02:00