コード例 #1
0
        /// <summary>
        /// Get the known types from the <see cref="AbstractSyntaxTree"/>.
        /// </summary>
        /// <param name="abstractSyntaxTree"></param>
        /// <returns></returns>
        public static List <KnownType> GetKnownTypes(AbstractSyntaxTree abstractSyntaxTree)
        {
            var harvester = new KnownTypesHarvester();

            harvester.Visit(abstractSyntaxTree);
            return(harvester._knownTypes);
        }
コード例 #2
0
ファイル: SemanticModel.cs プロジェクト: mjul/diesel
 public SemanticModel(AbstractSyntaxTree abstractSyntaxTree)
 {
     AbstractSyntaxTree = abstractSyntaxTree;
     _knownTypes        = new Lazy <IReadOnlyCollection <KnownType> >(
         () => KnownTypesHarvester.GetKnownTypes(abstractSyntaxTree));
 }