[−][src]Struct clang::Parser
Parses translation units.
Methods
impl<'tu> Parser<'tu>
[src]
pub 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.
pub 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.
pub 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.
pub 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.
pub 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]
pub 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>
pub fn unsaved(&mut self, unsaved: &[Unsaved]) -> &mut Parser<'tu>
[src]
Sets the unsaved files to use.
pub 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]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'tu> Debug for Parser<'tu>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,