Module ida_srclang
Third-party compiler support.
Global variables
var SRCLANG_C
-
C.
var SRCLANG_CPP
-
C++.
var SRCLANG_GO
-
Golang (not supported yet)
var SRCLANG_OBJC
-
Objective-C.
var SRCLANG_SWIFT
-
Swift (not supported yet)
Functions
def parse_decls_for_srclang(*args) ‑> int
-
parse_decls_for_srclang(lang, til, input, is_path) -> intParse type declarations in the specified languagelang: (C++: srclang_t) the source language(s) expected in the inputtil: (C++: til_t *) type library to store the typesinput: (C++: const char *) input source. can be a file path or decl stringis_path: (C++: bool) true if input parameter is a path to a source file, false if theinput is an in-memory source snippetretval -1: no parser was found that supports the given source language(s)retval else: the number of errors encountered in the input source
def parse_decls_with_parser(*args) ‑> int
-
parse_decls_with_parser(parser_name, til, input, is_path) -> intParse type declarations using the parser with the specified nameparser_name: (C++: const char *) name of the target parsertil: (C++: til_t *) type library to store the typesinput: (C++: const char *) input source. can be a file path or decl stringis_path: (C++: bool) true if input parameter is a path to a source file, false if theinput is an in-memory source snippetretval -1: no parser was found with the given nameretval else: the number of errors encountered in the input source
def select_parser_by_name(*args) ‑> bool
-
select_parser_by_name(name) -> boolSet the parser with the given name as the current parser. Pass nullptr or an empty string to select the default parser.name: (C++: const char *) char const *return: false if no parser was found with the given name
def select_parser_by_srclang(*args) ‑> bool
-
select_parser_by_srclang(lang) -> boolSet the parser that supports the given language(s) as the current parser. The selected parser must support all languages specified by the given srclang_t.lang: (C++: srclang_t)return: false if no such parser was found
def set_parser_argv(*args) ‑> int
-
set_parser_argv(parser_name, argv) -> intSet the command-line args to use for invocations of the parser with the given nameparser_name: (C++: const char *) name of the target parserargv: (C++: const char *) argument listretval -1: no parser was found with the given nameretval -2: the operation is not supported by the given parserretval 0: success