Struct ezno_checker::synthesis::EznoParser
source · pub struct EznoParser;
Trait Implementations§
source§impl ASTImplementation for EznoParser
impl ASTImplementation for EznoParser
type ParseOptions = ParseOptions
type ParseError = (ParseError, SourceId)
§type ParserRequirements = ()
type ParserRequirements = ()
Custom allocator etc
type Module<'_a> = Module
§type OwnedModule = Module
type OwnedModule = Module
TODO temp item. Some modules can have references
type DefinitionFile<'_a> = Module
type TypeAnnotation<'_a> = TypeAnnotation
type TypeParameter<'_a> = TypeParameter
type Expression<'_a> = Expression
type MultipleExpression<'_a> = MultipleExpression
type ClassMethod<'_a> = FunctionBase<ClassFunctionBase>
§type VariableField<'_a> = VariableField
type VariableField<'_a> = VariableField
Used in
for of
, for in
and function parameterstype ForStatementInitiliser<'_a> = ForLoopStatementinitialiser
fn module_from_string( source_id: SourceId, string: String, options: Self::ParseOptions, _parser_requirements: &mut Self::ParserRequirements ) -> Result<Self::Module<'static>, Self::ParseError>
fn definition_module_from_string( source_id: SourceId, string: String, _parser_requirements: &mut Self::ParserRequirements ) -> Result<Self::DefinitionFile<'static>, Self::ParseError>
fn synthesise_module<T: ReadFromFS>( module: &Self::Module<'_>, _source_id: SourceId, module_environment: &mut Environment<'_>, checking_data: &mut CheckingData<'_, T, Self> )
fn synthesise_definition_file<T: ReadFromFS>( file: Self::DefinitionFile<'_>, source: SourceId, root: &RootContext, checking_data: &mut CheckingData<'_, T, Self> ) -> (Names, LocalInformation)
source§fn synthesise_expression<U: ReadFromFS>(
expression: &Self::Expression<'_>,
expecting: TypeId,
environment: &mut Environment<'_>,
checking_data: &mut CheckingData<'_, U, Self>
) -> TypeId
fn synthesise_expression<U: ReadFromFS>( expression: &Self::Expression<'_>, expecting: TypeId, environment: &mut Environment<'_>, checking_data: &mut CheckingData<'_, U, Self> ) -> TypeId
Expected is used for eagerly setting function parameters
fn expression_position<'_a>(expression: &'_a Self::Expression<'_a>) -> Span
fn type_parameter_name<'_a>( parameter: &'_a Self::TypeParameter<'_a> ) -> &'_a str
fn type_annotation_position<'_a>( annotation: &'_a Self::TypeAnnotation<'_a> ) -> Span
fn synthesise_type_annotation<T: ReadFromFS>( annotation: &Self::TypeAnnotation<'_>, environment: &mut Environment<'_>, checking_data: &mut CheckingData<'_, T, Self> ) -> TypeId
fn parse_options( is_js: bool, parse_comments: bool, lsp_mode: bool ) -> Self::ParseOptions
fn owned_module_from_module(m: Self::Module<'static>) -> Self::OwnedModule
source§fn synthesise_multiple_expression<'_a, T: ReadFromFS>(
expression: &'_a Self::MultipleExpression<'_a>,
expected_type: TypeId,
environment: &mut Environment<'_>,
checking_data: &mut CheckingData<'_, T, Self>
) -> TypeId
fn synthesise_multiple_expression<'_a, T: ReadFromFS>( expression: &'_a Self::MultipleExpression<'_a>, expected_type: TypeId, environment: &mut Environment<'_>, checking_data: &mut CheckingData<'_, T, Self> ) -> TypeId
Expected is used for eagerly setting function parameters
source§fn synthesise_for_loop_initialiser<'_a, T: ReadFromFS>(
for_loop_initialiser: &'_a Self::ForStatementInitiliser<'_a>,
environment: &mut Environment<'_>,
checking_data: &mut CheckingData<'_, T, Self>
)
fn synthesise_for_loop_initialiser<'_a, T: ReadFromFS>( for_loop_initialiser: &'_a Self::ForStatementInitiliser<'_a>, environment: &mut Environment<'_>, checking_data: &mut CheckingData<'_, T, Self> )
Don’t need to return anything. All information recorded via changed to
environment
source§fn declare_and_assign_to_fields<'a, T: ReadFromFS>(
field: &'a Self::VariableField<'a>,
environment: &mut Environment<'_>,
checking_data: &mut CheckingData<'_, T, Self>,
arguments: VariableRegisterArguments
)
fn declare_and_assign_to_fields<'a, T: ReadFromFS>( field: &'a Self::VariableField<'a>, environment: &mut Environment<'_>, checking_data: &mut CheckingData<'_, T, Self>, arguments: VariableRegisterArguments )
For
for in
and for of loops
fn parameter_constrained<'a>(parameter: &'a Self::TypeParameter<'a>) -> bool
fn synthesise_block<'a, T: ReadFromFS>( block: &'a Self::Block<'a>, environment: &mut Environment<'_>, checking_data: &mut CheckingData<'_, T, Self> )
source§impl<U: FunctionBased + 'static> SynthesisableFunction<EznoParser> for FunctionBase<U>where
U::Body: SynthesisableFunctionBody,
impl<U: FunctionBased + 'static> SynthesisableFunction<EznoParser> for FunctionBase<U>where
U::Body: SynthesisableFunctionBody,
source§fn get_position(&self) -> Span
fn get_position(&self) -> Span
For debugging only
fn has_body(&self) -> bool
source§fn type_parameters<T: ReadFromFS>(
&self,
environment: &mut Environment<'_>,
checking_data: &mut CheckingData<'_, T, EznoParser>
) -> Option<GenericTypeParameters>
fn type_parameters<T: ReadFromFS>( &self, environment: &mut Environment<'_>, checking_data: &mut CheckingData<'_, T, EznoParser> ) -> Option<GenericTypeParameters>
THIS FUNCTION IS EXPECTED TO PUT THE TYPE PARAMETERS INTO THE ENVIRONMENT WHILE SYNTHESISING THEM
fn this_constraint<T: ReadFromFS>( &self, environment: &mut Environment<'_>, checking_data: &mut CheckingData<'_, T, EznoParser> ) -> Option<TypeId>
source§fn super_constraint<T: ReadFromFS>(
&self,
environment: &mut Environment<'_>,
checking_data: &mut CheckingData<'_, T, EznoParser>
) -> Option<TypeId>
fn super_constraint<T: ReadFromFS>( &self, environment: &mut Environment<'_>, checking_data: &mut CheckingData<'_, T, EznoParser> ) -> Option<TypeId>
For object literals
source§fn parameters<T: ReadFromFS>(
&self,
environment: &mut Environment<'_>,
checking_data: &mut CheckingData<'_, T, EznoParser>,
expected_parameters: Option<&SynthesisedParameters>
) -> SynthesisedParameters
fn parameters<T: ReadFromFS>( &self, environment: &mut Environment<'_>, checking_data: &mut CheckingData<'_, T, EznoParser>, expected_parameters: Option<&SynthesisedParameters> ) -> SynthesisedParameters
THIS FUNCTION IS EXPECTED TO PUT THE PARAMETERS INTO THE ENVIRONMENT WHILE SYNTHESISING THEM
fn return_type_annotation<T: ReadFromFS>( &self, environment: &mut Environment<'_>, checking_data: &mut CheckingData<'_, T, EznoParser> ) -> Option<ReturnType>
source§fn body<T: ReadFromFS>(
&self,
environment: &mut Environment<'_>,
checking_data: &mut CheckingData<'_, T, EznoParser>
)
fn body<T: ReadFromFS>( &self, environment: &mut Environment<'_>, checking_data: &mut CheckingData<'_, T, EznoParser> )
Returned type is extracted from events, thus doesn’t expect anything in return
fn id(&self, source_id: SourceId) -> FunctionId
Auto Trait Implementations§
impl Freeze for EznoParser
impl RefUnwindSafe for EznoParser
impl Send for EznoParser
impl Sync for EznoParser
impl Unpin for EznoParser
impl UnwindSafe for EznoParser
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more