Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust #97

Open
wants to merge 121 commits into
base: main
Choose a base branch
from
Open

Rust #97

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
5a8e1e5
integration tests
adamtrilling Mar 4, 2022
086cd57
tests that expect errors should fail if the error is a missing implem…
adamtrilling Mar 4, 2022
13bea58
evaluate at and literals
adamtrilling Mar 5, 2022
13182f3
evaluate arrays
adamtrilling Mar 5, 2022
c8f0abf
evaluate objects
adamtrilling Mar 5, 2022
4159d1c
add a trivial unit test
adamtrilling Mar 5, 2022
6995126
add unit tests for values
adamtrilling Mar 5, 2022
bc4ea8b
bring in shared integration tests
adamtrilling Mar 6, 2022
5ea7687
add array unit tests
adamtrilling Mar 6, 2022
d672fee
add unit tests for object
adamtrilling Mar 6, 2022
4c9642c
partial evaluation of infix operators
adamtrilling Mar 7, 2022
9b6778e
partial evaluation of functions
adamtrilling Mar 7, 2022
2d95d8d
evaluate not operator
adamtrilling Mar 7, 2022
e52ff04
evaluate piped expressions
adamtrilling Mar 8, 2022
acfd650
oosp
adamtrilling Mar 8, 2022
9dc2529
evaluate all of the infix operators except match
adamtrilling Mar 8, 2022
21c9de3
correct behavior of and operator
adamtrilling Mar 8, 2022
c5ed160
correct behavior of or operator
adamtrilling Mar 8, 2022
85e0458
cast numbers to string
adamtrilling Mar 9, 2022
d7eb1ae
float function
adamtrilling Mar 10, 2022
e3f6420
make test runner less pedantic about comparing floats to ints
adamtrilling Mar 11, 2022
3bd6aab
2-arg index function
adamtrilling Mar 12, 2022
edd05c0
rename context to data
adamtrilling Mar 12, 2022
aa16988
pass previous result as first argument to function in piped expression
adamtrilling Mar 13, 2022
3f93b65
range indexes on strings
adamtrilling Mar 14, 2022
2519281
range index on array
adamtrilling Mar 14, 2022
89266df
add rust tests to various parts
evinism Jan 15, 2022
bc06754
fix at as context and implicit at. hopefully.
adamtrilling Mar 15, 2022
797dec5
parse indexed_value and fix order of arguments to index
adamtrilling Mar 15, 2022
e998840
fix some range indexing issues
adamtrilling Mar 15, 2022
64d8e4c
rename value to terminal to make way for new Value
adamtrilling Mar 22, 2022
da45ba9
create crate Value type
adamtrilling Mar 27, 2022
198f436
eval at (411 failures)
adamtrilling Mar 27, 2022
e0c7759
evaluate boolean, number, and string literals (395)
adamtrilling Mar 29, 2022
2653d4c
eval arrays (383)
adamtrilling Mar 29, 2022
ff8b793
evaluate objects (381)
adamtrilling Mar 30, 2022
cf76f02
convert array and object to Value (379)
adamtrilling Mar 30, 2022
7ef3550
evaluate arithmetic operators (369)
adamtrilling Mar 30, 2022
345b506
make Value converters infallible
adamtrilling Mar 30, 2022
c4e3916
eval prefixed values (361)
adamtrilling Mar 31, 2022
8b12281
boolean operators (341)
adamtrilling Mar 31, 2022
fdeda8c
compare operators (273)
adamtrilling Mar 31, 2022
233f6cd
indexed value (271)
adamtrilling Mar 31, 2022
eb40799
log function (210)
adamtrilling Mar 31, 2022
357e0cf
index function (198)
adamtrilling Mar 31, 2022
bb3420a
count function (193)
adamtrilling Mar 31, 2022
0266420
string function (166)
adamtrilling Mar 31, 2022
3d5cc33
float function (148)
adamtrilling Mar 31, 2022
5b13991
treat ident as string for now (142)
adamtrilling Mar 31, 2022
b64e048
unignore unit tests
adamtrilling Mar 31, 2022
4e182a2
add ident as a Value type (139)
adamtrilling Mar 31, 2022
25eec6e
make Value into a submodule
adamtrilling Apr 1, 2022
37d5125
reimplement string function in terms of Display
adamtrilling Apr 1, 2022
9d5d059
cast object and array to string (134)
adamtrilling Apr 1, 2022
8a6b24f
move each function to its own module
adamtrilling Apr 2, 2022
12dc939
an ident in a piped expression is a function name
adamtrilling Apr 2, 2022
2e4b7c9
keys function (134)
adamtrilling Apr 2, 2022
4c5c0af
values function (132)
adamtrilling Apr 2, 2022
b904c0b
sum function (129)
adamtrilling Apr 3, 2022
e2dfa5c
map function (128)
adamtrilling Apr 3, 2022
6564b7d
rm unnecessary eval module
adamtrilling Apr 4, 2022
7995be8
reimplement log with lazy arg evaluation (265)
adamtrilling Apr 5, 2022
e435428
handle implicit at in log (265)
adamtrilling Apr 5, 2022
50a40cd
reimplement count with lazy args (260)
adamtrilling Apr 5, 2022
ecfb987
reimplement float with lazy args (236)
adamtrilling Apr 6, 2022
d17161a
split item_index and range_index into functions with explicit params
adamtrilling Apr 6, 2022
a43d44e
implement index function in terms of item_index and range_index (186)
adamtrilling Apr 6, 2022
d54345f
reimplement keys and values with lazy args (182)
adamtrilling Apr 6, 2022
166de3f
alphabetize
adamtrilling Apr 6, 2022
1ab3501
reimplement sum with lazy args (176)
adamtrilling Apr 6, 2022
286ced3
reimplement string with lazy args (143)
adamtrilling Apr 6, 2022
8a0ca65
implement map, mapkeys, and mapvalues (141)
adamtrilling Apr 7, 2022
0534fcf
addition works on strings and arrays (138)
adamtrilling Apr 7, 2022
8e9466e
entries function (136)
adamtrilling Apr 7, 2022
f79a542
flatten function (127)
adamtrilling Apr 7, 2022
2258da6
regex and match functions
adamtrilling Apr 8, 2022
1c00236
match operator (97)
adamtrilling Apr 8, 2022
291a8ff
split function (96)
adamtrilling Apr 11, 2022
4b0b962
add unimplemented functions to the pattern so I can implement implici…
adamtrilling Apr 12, 2022
d63e6ab
implicit dot access (94)
adamtrilling Apr 12, 2022
12dcc72
deep dot access (88)
adamtrilling Apr 12, 2022
eecc5f8
fix recursive dotaccess (83)
adamtrilling Apr 12, 2022
7bc52e8
regex shouldn't cast to string (82)
adamtrilling Apr 12, 2022
b5953ed
apply function (77)
adamtrilling Apr 12, 2022
e5f208b
un-ignore unit tests that were failing due to missing implementations…
adamtrilling Apr 12, 2022
fac364d
rm unused file
adamtrilling Apr 12, 2022
5afe957
if function (73)
adamtrilling Apr 12, 2022
0243841
filter functions (61)
adamtrilling Apr 13, 2022
d06fd01
find function (59)
adamtrilling Apr 13, 2022
22a7916
fromentries function (56)
adamtrilling Apr 13, 2022
b33e238
groupby function (51)
adamtrilling Apr 14, 2022
9001a25
reduce function (50)
adamtrilling Apr 14, 2022
d8e1127
reverse function (48)
adamtrilling Apr 14, 2022
206d8db
partial ordering on Value
adamtrilling Apr 14, 2022
9524d55
refactor Value::Number into a separate type
adamtrilling Apr 18, 2022
e3c95ba
implement Eq on Number (47)
adamtrilling Apr 18, 2022
5f1dcf3
implement total ordering on Number
adamtrilling Apr 18, 2022
ef4e108
sort and sortby functions (41)
adamtrilling Apr 21, 2022
2eb5313
implement arithmetic operators on Value::Number
adamtrilling Apr 21, 2022
bfa7368
summarize function (40)
adamtrilling Apr 22, 2022
ed06ef9
implement Copy on Number
adamtrilling Apr 22, 2022
3550904
prevent division by zero (41)
adamtrilling Apr 22, 2022
c79e168
fix string unescaping (32)
adamtrilling Apr 23, 2022
65cdc06
replace function (29)
adamtrilling Apr 23, 2022
6c43f72
support regex flags (26)
adamtrilling Apr 23, 2022
466ad5e
stringjoin function (24)
adamtrilling Apr 24, 2022
a676d04
make conversion from Value to serde_json::Value fallable so we can pr…
adamtrilling Apr 24, 2022
fced504
WIP support first-class functions
adamtrilling Apr 25, 2022
3046c19
refactor function arguments (23)
adamtrilling Apr 27, 2022
749fbf1
make most function args evaluate lazily and support first-class funct…
adamtrilling May 1, 2022
cd8699f
enumerate functions and error out when one is missing (22)
adamtrilling May 2, 2022
15beac1
implement $ (21)
adamtrilling May 2, 2022
ed4c509
piped expression doesn't get context from the first expression (19)
adamtrilling May 2, 2022
ac2d79a
fix quoting when casting non-scalar values to strings (16)
adamtrilling May 3, 2022
22f9bca
sequence function (14)
adamtrilling May 3, 2022
a68b51b
withindices function (13)
adamtrilling May 4, 2022
c9df5ac
division is weird in dynamically-typed languages (12)
adamtrilling May 4, 2022
15af158
don't allow indexing on functions (11)
adamtrilling May 4, 2022
85a81ef
rm debug
adamtrilling May 4, 2022
0231cd8
tweak whitespace rules around indexing (10)
adamtrilling May 4, 2022
611e216
in split, filter out any result that equals the delimiter (9)
adamtrilling May 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Rust CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
name: Rust project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: test
args: --release --all-features --manifest-path rust/Cargo.toml
1 change: 1 addition & 0 deletions rust/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/
Loading