public override SyntaxNode VisitQualifiedName(QualifiedNameSyntax node) { GenericNameSyntax foundNode = FindListNode(node); if (foundNode == null) { return base.VisitQualifiedName(node); } return ToArray(foundNode); //return node.ReplaceNode(foundNode, arrayNode); }
public DeltaGen(CodeGen generator) : base(generator) { var recursiveType = this.applyTo.RecursiveTypeFromFamily; if (!recursiveType.IsDefault) { this.changedPropertiesEnumTypeName = SyntaxFactory.IdentifierName(recursiveType.TypeSymbol.Name + "ChangedProperties"); this.diffGramTypeSyntax = SyntaxFactory.QualifiedName(recursiveType.TypeSyntax, DiffGramTypeName); this.recursiveDiffingType = SyntaxFactory.QualifiedName( SyntaxFactory.IdentifierName(nameof(ImmutableObjectGraph)), SyntaxFactory.GenericName(nameof(ImmutableObjectGraph.IRecursiveDiffingType<uint, uint>)) .AddTypeArgumentListArguments( this.changedPropertiesEnumTypeName, this.diffGramTypeSyntax)); } }
public override SyntaxNode VisitQualifiedName(QualifiedNameSyntax node) { bool oldAlwaysSimplify = this.alwaysSimplify; if (!this.alwaysSimplify) { this.alwaysSimplify = node.HasAnnotation(Simplifier.Annotation); } var result = SimplifyExpression( node, newNode: base.VisitQualifiedName(node), simplifier: SimplifyName); this.alwaysSimplify = oldAlwaysSimplify; return result; }
public QualifiedNameTranslation(QualifiedNameSyntax syntax, SyntaxTranslation parent) : base(syntax, parent) { Left = syntax.Left.Get<NameTranslation>(this); Right = syntax.Right.Get<SimpleNameTranslation>(this); var genericTranslation = Left as GenericNameTranslation; if (genericTranslation != null) { ((GenericNameTranslation)Left).ExcludeTypeParameter = true; } var simpleName = Right as SimpleNameTranslation; if (simpleName != null) { simpleName.DetectApplyThis = false; var identifierName = simpleName as IdentifierNameTranslation; if (genericTranslation != null && identifierName!=null) { identifierName.TypeArgumentList = genericTranslation.TypeArgumentList; } } }
public override void VisitQualifiedName(QualifiedNameSyntax node) { bool seenConstructedBeforeRight = seenConstructed; // Visit Right first because it's smaller (to make backtracking cheaper). Visit(node.Right); bool seenConstructedBeforeLeft = seenConstructed; Visit(node.Left); // If the first time we saw a constructed type was in Left, then we need to re-visit Right if (!seenConstructedBeforeRight && !seenConstructedBeforeLeft && seenConstructed) { Visit(node.Right); } }
public override VB.VisualBasicSyntaxNode VisitQualifiedName(CSS.QualifiedNameSyntax node) { return(VBFactory.QualifiedName((VBS.NameSyntax)node.Left.Accept(this), (VBS.SimpleNameSyntax)node.Right.Accept(this))); }
private static SimpleNameSyntax GetLeftMostSimpleName(QualifiedNameSyntax qn) { while (qn != null) { var left = qn.Left; var simpleName = left as SimpleNameSyntax; if (simpleName != null) { return simpleName; } qn = left as QualifiedNameSyntax; } return null; }
public override SyntaxNode VisitQualifiedName(QualifiedNameSyntax node) { // not descending into node to simplify the whole expression return AnnotateNodeWithSimplifyAnnotation(node); }
public override SyntaxNode VisitQualifiedName(QualifiedNameSyntax node) { if (node.Left.Kind() == SyntaxKind.IdentifierName) { var id = node.Left as IdentifierNameSyntax; _output.Write(id, id.Identifier.ValueText); } else { this.Visit(node.Left); _output.TrivialWrite(node.DotToken.ValueText); _output.Write(node.Right, node.Right.Identifier.ValueText); } return node; }
public override SyntaxNode VisitQualifiedName(QualifiedNameSyntax node) { _leftSideOfNames.Add(node.Left.ToString()); _fullNames.Add(node.ToString()); return base.VisitQualifiedName(node); }
/// <summary> /// /// </summary> /// <param name="node"></param> public override sealed void VisitQualifiedName(QualifiedNameSyntax node) { this.OnNodeVisited(node, this.type.IsInstanceOfType(node)); base.VisitQualifiedName(node); }
public FlatOperand Resolve(QualifiedNameSyntax qns, TypeInfo result_type, FlatOperand into_lvalue, List<FlatStatement> instructions) { SymbolInfo si = Model.GetSymbolInfo(qns); //string name = qns.Identifier.ToString(); switch (si.Symbol.Kind) { case SymbolKind.NamedType: { FlatOperand fop_type = Resolve((ITypeSymbol)si.Symbol, into_lvalue, instructions); if (into_lvalue != null) { instructions.Add(FlatStatement.REFERENCE(into_lvalue, fop_type)); } return fop_type; } break; } throw new NotImplementedException(si.Symbol.Kind.ToString()); }
/// <summary> /// /// </summary> /// <param name="node"></param> public override sealed void VisitQualifiedName(QualifiedNameSyntax node) { this.OnNodeVisited(node); if (!this.traverseRootOnly) base.VisitQualifiedName(node); }
private string QualifiedName(QualifiedNameSyntax qns) { string qName = ""; ChildSyntaxList idn = qns.ChildNodesAndTokens(); foreach(SyntaxNodeOrToken snot in idn.ToArray()) { if (snot.IsToken) { SyntaxToken st = (SyntaxToken)snot; if (st.IsKind(SyntaxKind.IdentifierToken)) { qName += st.ValueText; } else if (st.IsKind(SyntaxKind.DotToken)) { qName += "."; } } } return qName; }