MCPcopy Create free account
hub / github.com/LaBatata101/sith-language-server / parse_expr

Function parse_expr

crates/sith_python_ast_utils/src/lib.rs:663–669  ·  view source on GitHub ↗
(source: &str)

Source from the content-addressed store, hash-verified

661 use sith_python_parser::{parse_unchecked, Mode};
662
663 fn parse_expr(source: &str) -> Expr {
664 *parse_unchecked(source, Mode::Expression)
665 .into_syntax()
666 .expression()
667 .unwrap()
668 .body
669 }
670
671 #[test]
672 fn test_bool_op_expr_to_str() {

Callers 15

test_bool_op_expr_to_strFunction · 0.85
test_named_expr_to_strFunction · 0.85
test_bin_op_expr_to_strFunction · 0.85
test_lambda_expr_to_strFunction · 0.85
test_if_expr_to_strFunction · 0.85
test_dict_expr_to_strFunction · 0.85
test_set_expr_to_strFunction · 0.85
test_list_expr_to_strFunction · 0.85
test_tuple_expr_to_strFunction · 0.85

Calls 3

parse_uncheckedFunction · 0.85
expressionMethod · 0.80
into_syntaxMethod · 0.80

Tested by 15

test_bool_op_expr_to_strFunction · 0.68
test_named_expr_to_strFunction · 0.68
test_bin_op_expr_to_strFunction · 0.68
test_lambda_expr_to_strFunction · 0.68
test_if_expr_to_strFunction · 0.68
test_dict_expr_to_strFunction · 0.68
test_set_expr_to_strFunction · 0.68
test_list_expr_to_strFunction · 0.68
test_tuple_expr_to_strFunction · 0.68