public override void VisitFile(AstFile file)
        {
            var symbols = SetSymbolTable(file.SymbolTable);

            file.VisitChildren(this);
            SetSymbolTable(symbols);
        }
Example #2
0
        private void CreateDgmlFile(AstFile file, string fileName)
        {
            var builder = new AstDgmlBuilder();

            builder.CreateCommon();
            builder.WriteFile(file);
            builder.SaveAs(GetPath(fileName));
        }
Example #3
0
        public static void SaveFile(AstFile file, string filePath = "file.dgml")
        {
            var builder = new AstDgmlBuilder();

            builder.CreateCommon();
            _ = builder.WriteFile(file);
            builder.SaveAs(filePath);
        }
Example #4
0
        public Node WriteFile(AstFile file)
        {
            string moduleName = String.Empty;
            var    module     = (AstModule)(file.Parent);

            if (module is not null)
            {
                moduleName = module.Identifier.NativeFullName;
            }

            var node = CreateNode(moduleName, file.NodeKind);

            WriteCodeBlock(file.CodeBlock, node.Id);

            return(node);
        }
Example #5
0
 private void ApplySemantics(AstFile file)
 {
     // Note: processing is in order
     _resolveDefinition.Visit(file);
     _checkRules.Visit(file);
 }
Example #6
0
 public virtual void VisitFile(AstFile file)
 {
     file.VisitChildren(this);
 }
Example #7
0
 public override void VisitFile(AstFile file)
 {
     // file is root in our tests (Parent is null)
     file.VisitChildren(this);
 }