public VariableDeclarationTranslation(VariableDeclarationSyntax syntax, SyntaxTranslation parent) : base(syntax, parent) { Type = syntax.Type.Get <TypeTranslation>(this); Variables = syntax.Variables.Get <VariableDeclaratorSyntax, VariableDeclaratorTranslation>(this); if (!syntax.Type.IsVar) { Variables.GetEnumerable().First().FirstType = Type; } foreach (var item in Variables.GetEnumerable()) { item.KnownType = Type; } }
public ArgumentListTranslation(ArgumentListSyntax syntax, SyntaxTranslation parent) : base(syntax, parent) { Arguments = syntax.Arguments.Get <ArgumentSyntax, ArgumentTranslation>(this); }
public static SeparatedSyntaxListTranslation <T, TS> Get <T, TS>(this SeparatedSyntaxList <T> syntaxList, SyntaxTranslation parent) where T : SyntaxNode where TS : SyntaxTranslation { var newList = new SeparatedSyntaxListTranslation <T, TS>(syntaxList, parent); return(newList); }
public ParameterListTranslation(ParameterListSyntax syntax, SyntaxTranslation parent) : base(syntax, parent) { Parameters = syntax.Parameters.Get <ParameterSyntax, ParameterTranslation>(this); }