|
| static std::vector< pp_range > | scan_pp_directives (const std::string &src) |
| static tok_kind | map_clang_kind (const clang::Token &t) |
| static std::string | spelling_of (const clang::Token &t, const clang::SourceManager &sm, const clang::LangOptions &lo) |
| static std::vector< token > | tokenize (const std::string &src) |
| static size_t | skip_ws (const std::vector< token > &toks, size_t idx) |
| static const std::set< std::string > & | type_keywords () |
| static bool | is_type_keyword (const std::string &s) |
| static bool | is_non_func_keyword (const std::string &s) |
| static bool | try_parse_func_def (const std::vector< token > &toks, size_t idx, const std::string &enclosing_name, nested_func &out, size_t &def_end_tok_idx, const std::string &src) |
| static size_t | parse_decl_at (const std::vector< token > &toks, size_t idx, size_t end, const std::set< std::string > &nested_func_names, std::vector< local_var > &out_vars) |
| static std::vector< local_var > | collect_local_vars (const std::vector< token > &toks, size_t body_start_tok, size_t body_end_tok, const std::set< std::string > &nested_func_names) |
| static std::vector< local_var > | collect_params (const std::string ¶ms_text) |
| static bool | check_fptr_use (const std::vector< token > &toks, size_t body_start_tok, size_t body_end_tok, size_t def_start_tok, size_t def_end_tok, const std::string &func_name) |
| static size_t | skip_ws_back (const std::vector< token > &toks, size_t idx, size_t begin) |
| static size_t | find_control_stmt_end (const std::vector< token > &toks, size_t idx, size_t end) |
| template<class OnUse> |
| static void | scope_walk (scope_walker &w, OnUse on_use) |
| static std::vector< local_var > | find_captures (const std::string &body_text, const std::vector< local_var > &enclosing_vars, const std::string ¶ms_text) |
| static std::string | lifted_name (const std::string &enclosing, const std::string &nested) |
| static std::string | capture_global_name (const std::string &enclosing, const std::string &nested, const std::string &var) |
| static std::string | capture_param_name (const std::string &enclosing, const std::string &nested, const std::string &var) |
| static std::string | rewrite_identifiers (const std::string &text, const std::map< std::string, std::string > &replacements, const std::set< std::string > *scope_aware_names=nullptr, std::set< std::string > seed_scope={}) |
| static std::map< std::string, std::string > | build_capture_replacements (const std::vector< local_var > &captures, bool fptr_mode, const std::string &enclosing, const std::string &func_name) |
| static std::string | rewrite_body (const std::string &body_text, const std::string ¶ms_text, const std::vector< local_var > &captures, bool fptr_mode, const std::string &enclosing, const std::string &func_name) |
| static std::string | inner_params (const std::string ¶ms_text) |
| static std::set< std::string > | find_sibling_callees (const std::string &body_text, const std::string ¶ms_text, const std::set< std::string > &sibling_names) |
| static void | compute_effective_captures (std::vector< nested_func > &nested, const std::map< std::string, std::vector< local_var > > &enc_vars_by_name) |
| static std::vector< nested_func > | find_nested_functions (const std::string &src, const std::vector< token > &toks) |
| static std::string | apply_rewrites (std::string s, std::vector< rewrite_op > ops) |
| static std::vector< rewrite_op > | plan_nested_call_rewrites (const std::vector< token > &body_toks, size_t tok_begin, size_t tok_end, const std::vector< const nested_func * > &siblings, const std::function< std::string(const std::string &)> &source_for) |
| static std::string | rewrite_nested_calls (const std::string &body, const std::vector< const nested_func * > &siblings, const std::function< std::string(const std::string &)> &source_for) |
| static std::string | transform_one_pass (const std::string &src) |
| static std::string | usr_stem (const std::string &source_path) |
| | The source's basename, reduced to characters that read cleanly inside a symbol id.
|
| std::optional< file_operations::tmp_file > | transform_nested_functions (const std::string &source_path) |
| | Transforms GCC nested function definitions in a C source file into standard C by lambda-lifting them to file scope.
|