pub trait Visitor {
Show 31 methods
// Required method
fn reset(&mut self);
// Provided methods
fn document(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
doc: &AnalysisDocument,
version: SupportedVersion,
) { ... }
fn whitespace(
&mut self,
diagnostics: &mut Diagnostics,
whitespace: &Whitespace,
) { ... }
fn comment(&mut self, diagnostics: &mut Diagnostics, comment: &Comment) { ... }
fn version_statement(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
stmt: &VersionStatement,
) { ... }
fn import_statement(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
stmt: &ImportStatement,
) { ... }
fn struct_definition(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
def: &StructDefinition,
) { ... }
fn task_definition(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
task: &TaskDefinition,
) { ... }
fn workflow_definition(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
workflow: &WorkflowDefinition,
) { ... }
fn input_section(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
section: &InputSection,
) { ... }
fn output_section(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
section: &OutputSection,
) { ... }
fn command_section(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
section: &CommandSection,
) { ... }
fn command_text(
&mut self,
diagnostics: &mut Diagnostics,
text: &CommandText,
) { ... }
fn requirements_section(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
section: &RequirementsSection,
) { ... }
fn task_hints_section(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
section: &TaskHintsSection,
) { ... }
fn workflow_hints_section(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
section: &WorkflowHintsSection,
) { ... }
fn runtime_section(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
section: &RuntimeSection,
) { ... }
fn runtime_item(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
item: &RuntimeItem,
) { ... }
fn metadata_section(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
section: &MetadataSection,
) { ... }
fn parameter_metadata_section(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
section: &ParameterMetadataSection,
) { ... }
fn metadata_object(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
object: &MetadataObject,
) { ... }
fn metadata_object_item(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
item: &MetadataObjectItem,
) { ... }
fn metadata_array(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
item: &MetadataArray,
) { ... }
fn unbound_decl(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
decl: &UnboundDecl,
) { ... }
fn bound_decl(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
decl: &BoundDecl,
) { ... }
fn expr(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
expr: &Expr,
) { ... }
fn string_text(&mut self, diagnostics: &mut Diagnostics, text: &StringText) { ... }
fn placeholder(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
placeholder: &Placeholder,
) { ... }
fn conditional_statement(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
stmt: &ConditionalStatement,
) { ... }
fn scatter_statement(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
stmt: &ScatterStatement,
) { ... }
fn call_statement(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
stmt: &CallStatement,
) { ... }
}
Expand description
A trait used to implement an AST visitor.
Each encountered node will receive a corresponding method call that receives both a VisitReason::Enter call and a matching VisitReason::Exit call.
Required Methods§
Provided Methods§
Sourcefn document(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
doc: &AnalysisDocument,
version: SupportedVersion,
)
fn document( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, doc: &AnalysisDocument, version: SupportedVersion, )
Visits the root document node.
Sourcefn whitespace(&mut self, diagnostics: &mut Diagnostics, whitespace: &Whitespace)
fn whitespace(&mut self, diagnostics: &mut Diagnostics, whitespace: &Whitespace)
Visits a whitespace token.
Sourcefn comment(&mut self, diagnostics: &mut Diagnostics, comment: &Comment)
fn comment(&mut self, diagnostics: &mut Diagnostics, comment: &Comment)
Visit a comment token.
Sourcefn version_statement(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
stmt: &VersionStatement,
)
fn version_statement( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, stmt: &VersionStatement, )
Visits a top-level version statement node.
Sourcefn import_statement(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
stmt: &ImportStatement,
)
fn import_statement( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, stmt: &ImportStatement, )
Visits a top-level import statement node.
Sourcefn struct_definition(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
def: &StructDefinition,
)
fn struct_definition( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, def: &StructDefinition, )
Visits a struct definition node.
Sourcefn task_definition(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
task: &TaskDefinition,
)
fn task_definition( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, task: &TaskDefinition, )
Visits a task definition node.
Sourcefn workflow_definition(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
workflow: &WorkflowDefinition,
)
fn workflow_definition( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, workflow: &WorkflowDefinition, )
Visits a workflow definition node.
Sourcefn input_section(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
section: &InputSection,
)
fn input_section( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, section: &InputSection, )
Visits an input section node.
Sourcefn output_section(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
section: &OutputSection,
)
fn output_section( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, section: &OutputSection, )
Visits an output section node.
Sourcefn command_section(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
section: &CommandSection,
)
fn command_section( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, section: &CommandSection, )
Visits a command section node.
Sourcefn command_text(&mut self, diagnostics: &mut Diagnostics, text: &CommandText)
fn command_text(&mut self, diagnostics: &mut Diagnostics, text: &CommandText)
Visits a command text token in a command section node.
Sourcefn requirements_section(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
section: &RequirementsSection,
)
fn requirements_section( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, section: &RequirementsSection, )
Visits a requirements section node.
Sourcefn task_hints_section(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
section: &TaskHintsSection,
)
fn task_hints_section( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, section: &TaskHintsSection, )
Visits a task hints section node.
Sourcefn workflow_hints_section(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
section: &WorkflowHintsSection,
)
fn workflow_hints_section( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, section: &WorkflowHintsSection, )
Visits a workflow hints section node.
Sourcefn runtime_section(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
section: &RuntimeSection,
)
fn runtime_section( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, section: &RuntimeSection, )
Visits a runtime section node.
Sourcefn runtime_item(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
item: &RuntimeItem,
)
fn runtime_item( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, item: &RuntimeItem, )
Visits a runtime item node.
Sourcefn metadata_section(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
section: &MetadataSection,
)
fn metadata_section( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, section: &MetadataSection, )
Visits a metadata section node.
Sourcefn parameter_metadata_section(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
section: &ParameterMetadataSection,
)
fn parameter_metadata_section( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, section: &ParameterMetadataSection, )
Visits a parameter metadata section node.
Sourcefn metadata_object(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
object: &MetadataObject,
)
fn metadata_object( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, object: &MetadataObject, )
Visits a metadata object in a metadata or parameter metadata section.
Sourcefn metadata_object_item(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
item: &MetadataObjectItem,
)
fn metadata_object_item( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, item: &MetadataObjectItem, )
Visits a metadata object item in a metadata object.
Sourcefn metadata_array(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
item: &MetadataArray,
)
fn metadata_array( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, item: &MetadataArray, )
Visits a metadata array node in a metadata or parameter metadata section.
Sourcefn unbound_decl(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
decl: &UnboundDecl,
)
fn unbound_decl( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, decl: &UnboundDecl, )
Visits an unbound declaration node.
Sourcefn bound_decl(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
decl: &BoundDecl,
)
fn bound_decl( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, decl: &BoundDecl, )
Visits a bound declaration node.
Sourcefn expr(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
expr: &Expr,
)
fn expr( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, expr: &Expr, )
Visits an expression node.
Sourcefn string_text(&mut self, diagnostics: &mut Diagnostics, text: &StringText)
fn string_text(&mut self, diagnostics: &mut Diagnostics, text: &StringText)
Visits a string text token in a literal string node.
Sourcefn placeholder(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
placeholder: &Placeholder,
)
fn placeholder( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, placeholder: &Placeholder, )
Visits a placeholder node.
Sourcefn conditional_statement(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
stmt: &ConditionalStatement,
)
fn conditional_statement( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, stmt: &ConditionalStatement, )
Visits a conditional statement node in a workflow.
Sourcefn scatter_statement(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
stmt: &ScatterStatement,
)
fn scatter_statement( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, stmt: &ScatterStatement, )
Visits a scatter statement node in a workflow.
Sourcefn call_statement(
&mut self,
diagnostics: &mut Diagnostics,
reason: VisitReason,
stmt: &CallStatement,
)
fn call_statement( &mut self, diagnostics: &mut Diagnostics, reason: VisitReason, stmt: &CallStatement, )
Visits a call statement node in a workflow.