MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / parse_local_id

Function parse_local_id

src/expr-parser/src/parser.rs:637–646  ·  view source on GitHub ↗
(ident: syn::Ident)

Source from the content-addressed store, hash-verified

635 }
636
637 fn parse_local_id(ident: syn::Ident) -> syn::Result<LocalId> {
638 if ident.to_string().starts_with('l') {
639 let n = ident.to_string()[1..]
640 .parse::<u64>()
641 .map_err(|err| Error::new(ident.span(), err.to_string()))?;
642 Ok(mz_expr::LocalId::new(n))
643 } else {
644 Err(Error::new(ident.span(), "invalid LocalId"))
645 }
646 }
647
648 #[derive(Default)]
649 pub struct FixTypesCtx {

Callers 2

parse_getFunction · 0.85
parse_cteFunction · 0.85

Calls 2

spanMethod · 0.80
to_stringMethod · 0.45

Tested by

no test coverage detected