Module ida_srclang

Global Variables

SRCLANG_C

SRCLANG_C = 1

SRCLANG_CPP

SRCLANG_CPP = 2

SRCLANG_GO

SRCLANG_GO = 16

SRCLANG_OBJC

SRCLANG_OBJC = 4

SRCLANG_SWIFT

SRCLANG_SWIFT = 8

Functions

parse_decls_for_srclang(lang: srclang_t, til: til_t, input: char const *, is_path: bool) ‑> int

parse_decls_for_srclang(lang, til, input, is_path) -> int Parse type declarations in the specified language

lang: (C++: srclang_t) the source language(s) expected in the input
til: (C++: til_t *) type library to store the types
input: (C++: const char *) input source. can be a file path or decl string
is_path: (C++: bool) true if input parameter is a path to a source file, false if the
               input is an in-memory source snippet
retval -1: no parser was found that supports the given source language(s)
retval else: the number of errors encountered in the input source

parse_decls_with_parser(parser_name: char const *, til: til_t, input: char const *, is_path: bool) ‑> int

parse_decls_with_parser(parser_name, til, input, is_path) -> int Parse type declarations using the parser with the specified name

parser_name: (C++: const char *) name of the target parser
til: (C++: til_t *) type library to store the types
input: (C++: const char *) input source. can be a file path or decl string
is_path: (C++: bool) true if input parameter is a path to a source file, false if the
               input is an in-memory source snippet
retval -1: no parser was found with the given name
retval else: the number of errors encountered in the input source

select_parser_by_name(name: char const *) ‑> bool

select_parser_by_name(name) -> bool Set 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

select_parser_by_srclang(lang: srclang_t) ‑> bool

select_parser_by_srclang(lang) -> bool Set 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

set_parser_argv(parser_name: char const *, argv: char const *) ‑> int

set_parser_argv(parser_name, argv) -> int Set the command-line args to use for invocations of the parser with the given name

parser_name: (C++: const char *) name of the target parser
argv: (C++: const char *) argument list
retval -1: no parser was found with the given name
retval -2: the operation is not supported by the given parser
retval 0: success

Last updated