summaryrefslogtreecommitdiff
path: root/CC/proto/EXPRESSIONS
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2022-04-29 13:59:30 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2022-04-29 13:59:48 +0200
commit71e53e4c05201e97717e5fef24c6e5ce5eda980c (patch)
tree8fe88934857eb3bf7dcba476b05d75791e2f625d /CC/proto/EXPRESSIONS
parent124d53937a088813a95317fcd535acc0cf69024a (diff)
downloadrules-cc-71e53e4c05201e97717e5fef24c6e5ce5eda980c.tar.gz
rules: Perform disjoint map union in field_* expressions
... and replace all instances where the field_*_list variant of those expressions is used solely for the purpose of performing the disjoint union manually.
Diffstat (limited to 'CC/proto/EXPRESSIONS')
-rw-r--r--CC/proto/EXPRESSIONS27
1 files changed, 9 insertions, 18 deletions
diff --git a/CC/proto/EXPRESSIONS b/CC/proto/EXPRESSIONS
index cb7d8a2..4f807fe 100644
--- a/CC/proto/EXPRESSIONS
+++ b/CC/proto/EXPRESSIONS
@@ -1,16 +1,9 @@
{ "protoc-deps":
- { "imports": {"provider_list": ["./", "../..", "field_provider_list"]}
+ { "imports": {"map_provider": ["./", "../..", "field_map_provider"]}
, "expression":
- { "type": "disjoint_map_union"
- , "$1":
- { "type": "let*"
- , "bindings":
- [ ["fieldname", "deps"]
- , ["provider", "protoc-deps"]
- , ["default", {"type": "empty_map"}]
- ]
- , "body": {"type": "CALL_EXPRESSION", "name": "provider_list"}
- }
+ { "type": "let*"
+ , "bindings": [["fieldname", "deps"], ["provider", "protoc-deps"]]
+ , "body": {"type": "CALL_EXPRESSION", "name": "map_provider"}
}
}
, "protoc-compile":
@@ -18,6 +11,7 @@
, "imports":
{ "stage": ["", "stage_singleton_field"]
, "result": ["./", "..", "lib result"]
+ , "artifacts": ["./", "../..", "field_artifacts"]
, "artifacts_list": ["./", "../..", "field_artifacts_list"]
, "protoc-deps": "protoc-deps"
}
@@ -49,13 +43,10 @@
, { "type": "to_subdir"
, "subdir": "work"
, "$1":
- { "type": "disjoint_map_union"
- , "$1":
- { "type": "let*"
- , "bindings":
- [["fieldname", "well_known_protos"], ["transition", null]]
- , "body": {"type": "CALL_EXPRESSION", "name": "artifacts_list"}
- }
+ { "type": "let*"
+ , "bindings":
+ [["fieldname", "well_known_protos"], ["transition", null]]
+ , "body": {"type": "CALL_EXPRESSION", "name": "artifacts"}
}
}
]