C# Класс Microsoft.Zing.Replacer

This class aids in code generation by making substitutions in a given tree. It will be extended as needed to deal with additional types of substitution. See the static methods on the class for a description of what is supported.
Наследование: System.Compiler.StandardVisitor
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Replace ( System.Compiler.Node node, System.Compiler.Identifier oldName, System.Compiler.Node newNode ) : void

Within "node", replace occurrences of identifiers matching oldName (by value) with the given newNode. newNode must be an expression.

Replace ( System.Compiler.Node node, string labelName, System.Compiler.Block block ) : void

Within "node", find a labeled statement whose label matches the given string, and replace it with the supplied statement block.

Replace ( System.Compiler.Node node, string oldName, System.Compiler.Node newNode ) : void

Within "node", replace identifiers matching the value of oldName with the given newNode (of type Expression).

VisitAttributeList ( AttributeList attributes ) : AttributeList
VisitConstruct ( System.Compiler.Construct cons ) : System.Compiler.Expression
VisitIdentifier ( System.Compiler.Identifier identifier ) : System.Compiler.Expression
VisitLabeledStatement ( System.Compiler.LabeledStatement lStatement ) : System.Compiler.Statement
VisitLocalDeclaration ( System.Compiler.LocalDeclaration localDeclaration ) : System.Compiler.LocalDeclaration
VisitLocalDeclarationsStatement ( System.Compiler.LocalDeclarationsStatement localDeclarations ) : System.Compiler.Statement
VisitMemberBinding ( System.Compiler.MemberBinding memberBinding ) : System.Compiler.Expression
VisitQualifiedIdentifier ( System.Compiler.QualifiedIdentifier qualifiedIdentifier ) : System.Compiler.Expression
VisitTypeExpression ( System.Compiler.TypeExpression typeExpression ) : System.Compiler.TypeExpression
VisitTypeNode ( System.Compiler.TypeNode typeNode ) : System.Compiler.TypeNode
VisitTypeReference ( System.Compiler.TypeNode type ) : System.Compiler.TypeNode
VisitUnknownNodeType ( System.Compiler.Node node ) : System.Compiler.Node

Приватные методы

Метод Описание
Replacer ( System.Compiler.Identifier oldName, System.Compiler.Node newNode ) : System

Описание методов

Replace() публичный статический Метод

Within "node", replace occurrences of identifiers matching oldName (by value) with the given newNode. newNode must be an expression.
public static Replace ( System.Compiler.Node node, System.Compiler.Identifier oldName, System.Compiler.Node newNode ) : void
node System.Compiler.Node
oldName System.Compiler.Identifier
newNode System.Compiler.Node
Результат void

Replace() публичный статический Метод

Within "node", find a labeled statement whose label matches the given string, and replace it with the supplied statement block.
public static Replace ( System.Compiler.Node node, string labelName, System.Compiler.Block block ) : void
node System.Compiler.Node
labelName string
block System.Compiler.Block
Результат void

Replace() публичный статический Метод

Within "node", replace identifiers matching the value of oldName with the given newNode (of type Expression).
public static Replace ( System.Compiler.Node node, string oldName, System.Compiler.Node newNode ) : void
node System.Compiler.Node
oldName string
newNode System.Compiler.Node
Результат void

VisitAttributeList() публичный Метод

public VisitAttributeList ( AttributeList attributes ) : AttributeList
attributes AttributeList
Результат AttributeList

VisitConstruct() публичный Метод

public VisitConstruct ( System.Compiler.Construct cons ) : System.Compiler.Expression
cons System.Compiler.Construct
Результат System.Compiler.Expression

VisitIdentifier() публичный Метод

public VisitIdentifier ( System.Compiler.Identifier identifier ) : System.Compiler.Expression
identifier System.Compiler.Identifier
Результат System.Compiler.Expression

VisitLabeledStatement() публичный Метод

public VisitLabeledStatement ( System.Compiler.LabeledStatement lStatement ) : System.Compiler.Statement
lStatement System.Compiler.LabeledStatement
Результат System.Compiler.Statement

VisitLocalDeclaration() публичный Метод

public VisitLocalDeclaration ( System.Compiler.LocalDeclaration localDeclaration ) : System.Compiler.LocalDeclaration
localDeclaration System.Compiler.LocalDeclaration
Результат System.Compiler.LocalDeclaration

VisitLocalDeclarationsStatement() публичный Метод

public VisitLocalDeclarationsStatement ( System.Compiler.LocalDeclarationsStatement localDeclarations ) : System.Compiler.Statement
localDeclarations System.Compiler.LocalDeclarationsStatement
Результат System.Compiler.Statement

VisitMemberBinding() публичный Метод

public VisitMemberBinding ( System.Compiler.MemberBinding memberBinding ) : System.Compiler.Expression
memberBinding System.Compiler.MemberBinding
Результат System.Compiler.Expression

VisitQualifiedIdentifier() публичный Метод

public VisitQualifiedIdentifier ( System.Compiler.QualifiedIdentifier qualifiedIdentifier ) : System.Compiler.Expression
qualifiedIdentifier System.Compiler.QualifiedIdentifier
Результат System.Compiler.Expression

VisitTypeExpression() публичный Метод

public VisitTypeExpression ( System.Compiler.TypeExpression typeExpression ) : System.Compiler.TypeExpression
typeExpression System.Compiler.TypeExpression
Результат System.Compiler.TypeExpression

VisitTypeNode() публичный Метод

public VisitTypeNode ( System.Compiler.TypeNode typeNode ) : System.Compiler.TypeNode
typeNode System.Compiler.TypeNode
Результат System.Compiler.TypeNode

VisitTypeReference() публичный Метод

public VisitTypeReference ( System.Compiler.TypeNode type ) : System.Compiler.TypeNode
type System.Compiler.TypeNode
Результат System.Compiler.TypeNode

VisitUnknownNodeType() публичный Метод

public VisitUnknownNodeType ( System.Compiler.Node node ) : System.Compiler.Node
node System.Compiler.Node
Результат System.Compiler.Node