meta_language/translation/
surface_raw_metadata_rules.rs1#[must_use]
4pub fn accept_surface_raw_metadata_field(context: &str, field: &str) -> bool {
5 (((context == "expression") && (field == "parenthesized"))
6 || ((context == "program") && (field == "referenceSemantics")))
7 || ((context == "index") && ((field == "optional") || (field == "provenInBounds")))
8}
9
10#[must_use]
12pub fn accept_surface_raw_metadata_form(form: &str) -> bool {
13 (form == "boolean") || (form == "null")
14}
15
16#[must_use]
18pub fn accept_shared_surface_reference_kind(kind: &str) -> bool {
19 (((kind == "array") || (kind == "record")) || (kind == "map")) || (kind == "set")
20}
21
22#[must_use]
24pub const fn select_surface_reference_semantics(
25 required: bool,
26 structural: bool,
27 enabled: bool,
28) -> bool {
29 required || (enabled && structural)
30}