Commit graph

42 commits

Author SHA1 Message Date
Alexander Wang
453c24388a
d2ir: fix glob applications on edges 2024-03-06 22:50:42 -08:00
Gavin Nishizawa
f200c19e31
d2oracle Equals 2023-10-06 15:48:19 -07:00
Gavin Nishizawa
2fb7058ab6
handle nil Keys in Equals 2023-10-05 11:26:25 -07:00
Anmol Sethi
88b885a753
d2ir: Ensure filters pass before setting primary 2023-08-30 00:37:03 -07:00
Anmol Sethi
eed3f7eb21
d2ir: Many more glob fixes 2023-08-30 00:37:03 -07:00
Anmol Sethi
1800ae3448
d2ir: Add exception for &label filter 2023-08-30 00:37:03 -07:00
Anmol Sethi
bb6b176dee
d2ir: Implement lazy globs and triple glob
This finishes up the globs implementation!

See tests for what I mean by lazy globs and what the triple glob does.
2023-08-30 00:37:03 -07:00
Anmol Sethi
387c33660f
d2parser: Add not ampersand support
See #1567
2023-08-30 00:02:52 -07:00
Anmol Sethi
d0d3ebe17e
d2ir: Fix filters on nested fields
See test on edges
2023-07-30 13:16:56 -07:00
Anmol Sethi
0f45d2b082
d2ast: Fix RawString test with ampersand 2023-07-30 12:41:29 -07:00
Anmol Sethi
0002817b0a
d2ir: Implement ampersand filters 2023-07-30 12:41:29 -07:00
Anmol Sethi
6ca36e6b0c
d2ir: Glob review fixes 2023-07-30 12:41:15 -07:00
Anmol Sethi
6fdf4b07a5
d2ir: Make double globs work sanely across boards
See test.
2023-07-30 03:15:33 -07:00
Anmol Sethi
1217ff35a7
d2ir: Add single glob matching to edges and make it work fully recursively 2023-07-29 16:57:25 -07:00
Anmol Sethi
359976e5d4
d2ir: Add single level field glob patterns 2023-07-29 16:57:25 -07:00
Alexander Wang
b193b9be8a
cleanup 2023-07-11 13:44:00 -07:00
Alexander Wang
090d10e9ca
handle interpolation 2023-07-11 13:32:07 -07:00
Alexander Wang
c9793b9a87
label works 2023-07-10 19:24:21 -07:00
Bernard Xie
d2cfa5eb1d
Update d2ast.go 2023-06-19 18:40:10 -07:00
Bernard Xie
a7d3bb0f91
Merge branch 'master' into 1421/bottom-scope-special-boards 2023-06-19 17:47:23 -07:00
Bernard Xie
fdb73c14b2
rename + refactor 2023-06-19 17:39:05 -07:00
Bernard Xie
9c0f49829a
add test 2023-06-19 17:33:41 -07:00
Anmol Sethi
a5d3cc1429
d2parser: Parse and format @../file imports correctly 2023-06-06 16:15:01 -07:00
Anmol Sethi
35bf5d2c41
d2parser: Fix non file map range not including last brace 2023-06-06 15:48:14 -07:00
Anmol Sethi
bc8f180055
d2parser: Error on unquoted strings starting with ...@ 2023-06-06 14:47:40 -07:00
Anmol Sethi
2fcc9ed140
d2ir: Compile imports
Works as so:

index.d2:
```d2
x: @x
```

x.d2:
```d2
label: meow
shape: circle
```

TODO:

- [ ] Correctly import into fields by handling the scenarios/steps overlay.
      - And links.
- [ ] Test every kind of import.
2023-06-04 23:31:18 -07:00
Anmol Sethi
89e1e324d7
d2parser: Add imports support
Includes rewriting @file.d2 to @file
2023-05-30 15:44:35 -07:00
Alexander Wang
acf239d59a
fix underscores 2023-05-09 14:24:42 -07:00
Alexander Wang
7e4deb1618
fmt 2023-03-14 00:36:46 -07:00
Alexander Wang
c79a9ed366
fmt 2023-03-14 00:35:55 -07:00
Alexander Wang
bee43fd290
fix d2oracle move with duplicates 2023-03-14 00:29:37 -07:00
Alexander Wang
e91a046990
fix edge key index value 2023-02-20 20:17:17 -08:00
Anmol Sethi
30b5b64cad
d2ir: Review fixes #714 2023-01-27 23:19:50 -08:00
Anmol Sethi
9d0c73cef2
d2ast: Make null ScalarString empty string
So people know it's special at least until I fix d2compiler.
2023-01-24 03:24:27 -08:00
Anmol Sethi
d239b8dad1
d2ir: Fully implement scenarios/steps 2023-01-24 03:24:26 -08:00
Anmol Sethi
f69f401d23
d2ir: References wip 2023-01-24 03:24:10 -08:00
Anmol Sethi
10ca5e2ce1
d2ir: Add d2ir -> d2ast for stringifying the IR 2023-01-24 03:24:09 -08:00
Anmol Sethi
4b50748dd0
d2ir: Final PR imports
https://github.com/terrastruct/terrastruct-backend/pull/975/files#diff-1b00307a7a2bd1ffc68527a7df7c9c83327d8cd2dd00f4741ec6bd0b96605cd4
2023-01-24 02:56:31 -08:00
Anmol Sethi
d116889fc9
Switch fully to util-go 2022-12-01 11:48:49 -08:00
Anmol Sethi
a05ba67a36
go2: rm -rf 2022-12-01 10:49:15 -08:00
Alexander Wang
bded5b13fa
[ci-base] cleanup 2022-11-14 19:05:23 -08:00
Alexander Wang
524c089a74 oss
Co-authored-by: Anmol Sethi <hi@nhooyr.io>
2022-11-03 06:54:49 -07:00