MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / parse_nested_if

Function parse_nested_if

nodedb/src/control/planner/procedural/parser/mod.rs:171–186  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

169
170 #[test]
171 fn parse_nested_if() {
172 let block = parse_block(
173 "BEGIN \
174 IF x > 0 THEN \
175 IF x > 10 THEN RETURN 'big'; \
176 ELSE RETURN 'small'; \
177 END IF; \
178 END IF; \
179 END",
180 )
181 .unwrap();
182 let Statement::If { then_block, .. } = &block.statements[0] else {
183 panic!("expected If");
184 };
185 assert!(matches!(&then_block[0], Statement::If { .. }));
186 }
187
188 #[test]
189 fn parse_new_field_assignment() {

Callers

nothing calls this directly

Calls 1

parse_blockFunction · 0.85

Tested by

no test coverage detected