Struct clang::Parser
[−]
[src]
pub struct Parser<'tu> { /* fields omitted */ }
Parses translation units.
Methods
impl<'tu> Parser<'tu>
[src]
fn cache_completion_results(
&mut self,
cache_completion_results: bool
) -> &mut Parser<'tu>
[src]
&mut self,
cache_completion_results: bool
) -> &mut Parser<'tu>
Sets whether certain code completion results will be cached when the translation unit is reparsed.
This option increases the time it takes to reparse the translation unit but improves code completion performance.
fn detailed_preprocessing_record(
&mut self,
detailed_preprocessing_record: bool
) -> &mut Parser<'tu>
[src]
&mut self,
detailed_preprocessing_record: bool
) -> &mut Parser<'tu>
Sets whether a detailed preprocessing record will be constructed which tracks all macro definitions and instantiations.
fn briefs_in_completion_results(
&mut self,
briefs_in_completion_results: bool
) -> &mut Parser<'tu>
[src]
&mut self,
briefs_in_completion_results: bool
) -> &mut Parser<'tu>
Sets whether documentation comment briefs will be included in code completion results.
fn incomplete(&mut self, incomplete: bool) -> &mut Parser<'tu>
[src]
Sets whether the translation unit will be considered incomplete.
This option suppresses certain semantic analyses and is typically used when parsing headers with the intent of creating a precompiled header.
fn skip_function_bodies(
&mut self,
skip_function_bodies: bool
) -> &mut Parser<'tu>
[src]
&mut self,
skip_function_bodies: bool
) -> &mut Parser<'tu>
Sets whether function and method bodies will be skipped.
impl<'tu> Parser<'tu>
[src]
fn arguments<S: AsRef<str>>(&mut self, arguments: &[S]) -> &mut Parser<'tu>
[src]
Sets the compiler arguments to provide to libclang
.
Any compiler argument that could be supplied to clang
may be supplied to this
function. However, the following arguments are ignored:
-c
-emit-ast
-fsyntax-only
-o
and the following<output>
fn unsaved(&mut self, unsaved: &[Unsaved]) -> &mut Parser<'tu>
[src]
Sets the unsaved files to use.
fn parse(&self) -> Result<TranslationUnit<'tu>, SourceError>
[src]
Parses a translation unit.
Failures
- an error occurs while deserializing an AST file
libclang
crashes- an unknown error occurs
Trait Implementations
impl<'tu> Clone for Parser<'tu>
[src]
fn clone(&self) -> Parser<'tu>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more