MCPcopy Create free account
hub / github.com/hashintel/hash / empty

Function empty

libs/@local/hashql/syntax-jexpr/src/parser/array/error.rs:134–142  ·  view source on GitHub ↗
(span: SpanId)

Source from the content-addressed store, hash-verified

132"##;
133
134pub(crate) fn empty(span: SpanId) -> ArrayDiagnostic {
135 let mut diagnostic = Diagnostic::new(ArrayDiagnosticCategory::Empty, Critical::ERROR)
136 .primary(Label::new(span, "Empty array not allowed"));
137
138 diagnostic.add_message(Message::help(EMPTY_HELP));
139 diagnostic.add_message(Message::note(EMPTY_NOTE));
140
141 diagnostic
142}
143
144const TRAILING_COMMA_HELP: &str = "J-Expr does not support trailing commas in arrays. Use \
145 `[item1, item2]` instead of `[item1, item2,]`";

Callers 15

parse_arrayFunction · 0.70
start_rpc_serverFunction · 0.50
type_idsFunction · 0.50
insertFunction · 0.50
get_entity_linksFunction · 0.50
remove_linkFunction · 0.50
insertFunction · 0.50
seed_dbFunction · 0.50
seed_dbFunction · 0.50
seed_dataFunction · 0.50
newMethod · 0.50

Calls 2

primaryMethod · 0.80
add_messageMethod · 0.80

Tested by 11

seed_dataFunction · 0.40
is_bottom_correctnessFunction · 0.40
lawsFunction · 0.40
create_linkFunction · 0.40
serveMethod · 0.40