MCPcopy Create free account
hub / github.com/borgo-lang/borgo / expr_debug

Method expr_debug

compiler/src/parser.rs:1035–1054  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1033 }
1034
1035 fn expr_debug(&mut self) -> Expr {
1036 let kind = match self.tok.text.as_str() {
1037 "unreachable" => crate::ast::DebugKind::Unreachable,
1038 _ => panic!("unexpected debug {}", self.tok.text),
1039 };
1040
1041 // consume @unreachable
1042 let start = self.next();
1043
1044 let _params = self.parse_param_list(ParamsMode::Fn);
1045
1046 // TODO don't ignore params, they're useful for @todo()
1047
1048 Expr::Debug {
1049 kind,
1050 expr: Expr::Noop.into(),
1051 ty: Type::dummy(),
1052 span: self.make_span(start),
1053 }
1054 }
1055
1056 fn item_import(&mut self) -> Expr {
1057 assert!(self.tok.kind == TokenKind::Import);

Callers 1

stmt_supportMethod · 0.80

Calls 3

parse_param_listMethod · 0.80
make_spanMethod · 0.80
nextMethod · 0.45

Tested by

no test coverage detected