1///|
2pub extern "c" fn type Index
Index::new(
3 excludeDeclarationsFromPCH : Bool
Bool,
4 displayDiagnostics : Bool
Bool
5) -> type Index
Index = "illusory0x0_clang_Index_new"
6
7///|
8pub fn type Index
Index::(self : Index, source_filename : Bytes, command_line_args : FixedArray[Bytes], option : TranslationUnit_Flags) -> TranslationUnit raise ParseError
parse(
9 Index
self : type Index
Index,
10 Bytes
source_filename : Bytes
Bytes,
11 FixedArray[Bytes]
command_line_args : type FixedArray[A]
FixedArray[Bytes
Bytes],
12 TranslationUnit_Flags
option : enum TranslationUnit_Flags {
None
DetailedPreprocessingRecord
Incomplete
PrecompiledPreamble
CacheCompletionResults
ForSerialization
CXXChainedPCH
SkipFunctionBodies
IncludeBriefCommentsInCodeCompletion
CreatePreambleOnFirstParse
KeepGoing
SingleFileParse
LimitSkipFunctionBodiesToPreamble
IncludeAttributedTypes
VisitImplicitAttributes
IgnoreNonErrorsFromIncludedFiles
RetainExcludedConditionalBlocks
}
TranslationUnit_Flags
13) -> type TranslationUnit
TranslationUnit raise type! ParseError ErrorCode
ParseError {
14 let Ref[ErrorCode]
out_ec : struct Ref[A] {
mut val: A
}
Ref[enum ErrorCode {
Success
Failure_
Crashed
InvalidArguments
ASTReadError
}
ErrorCode] = struct Ref[A] {
mut val: A
}
Ref::(x : ErrorCode) -> Ref[ErrorCode]
create a reference from value
new(ErrorCode
Failure_)
15 let TranslationUnit
res = Index
self.(self : Index, source_filename : Bytes, command_line_args : FixedArray[Bytes], option : TranslationUnit_Flags, out_ec : Ref[ErrorCode]) -> TranslationUnit
_parse(Bytes
source_filename, FixedArray[Bytes]
command_line_args, TranslationUnit_Flags
option, Ref[ErrorCode]
out_ec)
16 if Ref[ErrorCode]
out_ec.ErrorCode
val (x : ErrorCode, y : ErrorCode) -> Bool
!= ErrorCode
Success {
17 raise (ErrorCode) -> ParseError
ParseError(Ref[ErrorCode]
out_ec.ErrorCode
val)
18 } else {
19 TranslationUnit
res
20 }
21}
22