Skip to main content

GoParser

Struct GoParser 

Source
pub struct GoParser;

Implementations§

Source§

impl GoParser

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl Default for GoParser

Source§

fn default() -> GoParser

Returns the “default value” for a type. Read more
Source§

impl LanguageParser for GoParser

Source§

fn language_id(&self) -> &'static str

Source§

fn language(&self) -> Language

Source§

fn extensions(&self) -> &'static [&'static str]

Source§

fn parse(&self, source: &str) -> ParseResult

Source§

fn extract_unchecked(&self, result: &ParseResult) -> ExtractionResult

Source§

fn parser_mode(&self) -> &'static str

Source§

fn validate_result(&self, result: &ParseResult) -> Result<(), ExtractionError>

Source§

fn extract( &self, result: &ParseResult, ) -> Result<ExtractionResult, ExtractionError>

Extract facts only from a complete parse result.
Source§

fn extract_best_effort( &self, result: &ParseResult, ) -> Result<ExtractionResult, ExtractionError>

Explicitly opt into facts recovered from an incomplete parse.
Source§

fn symbols( &self, result: &ParseResult, ) -> Result<Vec<ParsedSymbol>, ExtractionError>

Source§

fn imports( &self, result: &ParseResult, ) -> Result<Vec<ParsedImport>, ExtractionError>

Source§

fn calls( &self, result: &ParseResult, ) -> Result<Vec<ParsedCall>, ExtractionError>

Source§

fn variables( &self, result: &ParseResult, ) -> Result<Vec<ParsedVariable>, ExtractionError>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.