private void InitializeRoleNodes(GMacAst dsl) { RoleNodes = new TreeNode[8]; RoleNodes[NamespacesNode] = new TreeNode("Namespaces"); RoleNodes[FramesNode] = new TreeNode("Frames"); RoleNodes[FrameSubspacesNode] = new TreeNode("Subspaces"); RoleNodes[ConstantsNode] = new TreeNode("Constants"); RoleNodes[StructuresNode] = new TreeNode("Structures"); RoleNodes[MacrosNode] = new TreeNode("Macros"); RoleNodes[MacroTemplatesNode] = new TreeNode("Macro Templates"); RoleNodes[TransformsNode] = new TreeNode("Transforms"); DslNode = new TreeNode("GMacDSL") { Tag = dsl }; DslNode.Nodes.AddRange(RoleNodes); DslNode.Expand(); }
public static TreeNode Convert(GMacAst ast) { var converter = new GMacAstToTreeViewNodesByRole(); converter.Visit(ast); return(converter.DslNode); }
internal FormInteractiveScript(GMacAst ast) { InitializeComponent(); _gmacAst = ast; ResetScriptManager(); }
public void Visit(GMacAst dsl) { InitializeRoleNodes(dsl); foreach (var childSymbol in dsl.ChildNamespaces) { Visit(childSymbol); } }
private void InitializeProject(GMacProject gmacDslProject) { _dslProject = gmacDslProject; _dslCompiler = new GMacProjectCompiler(); _astRoot = null; ResetCompilationInterface(); ChangeOpenedSourceFile(null); }
internal FormAstExplorer(GMacAst ast) { InitializeComponent(); Root = new AstRoot(ast); _astDescriptionVisitor = new GMacAstDescriptionVisitor(Root); FillComponentsTree(); }
public TreeNode Visit(GMacAst dsl) { var node = new TreeNode("<DSL> GMac") { Tag = dsl }; foreach (var childSymbol in dsl.ChildNamespaces) { node.Nodes.Add(Visit(childSymbol)); } return(node); }
private void SetEditorTextChangedStatus(bool flag) { if (flag == _editorTextChangedStatus) { return; } _editorTextChangedStatus = flag; if (SourceCodeTextEditor.IsChanged != flag) { SourceCodeTextEditor.IsChanged = flag; } if (!flag) { _astRoot = null; } UpdateInterface_EnableControls(); }
public LlDataTable(GMacAst dsl) { GMacRootAst = dsl; }
private bool CompileSourceFiles(bool forceCompilation = false) { if (AskSaveSourceCode() == false) { return(false); } ResetCompilationInterface(); var startCompilationTime = DateTime.Now; textBoxOutputLog.Text = startCompilationTime.ToLongTimeString() + @" Start Compilation" + Environment.NewLine; Application.DoEvents(); GMacSystemUtils.ResetProgress(); _dslCompiler.Compile(_dslProject, forceCompilation); var endCompilationTime = DateTime.Now; textBoxOutputLog.Text += _dslCompiler.CompilationLog.Progress.History.ToString(); //textBoxOutputLog.Text += _dslCompiler.CompilationLog.TimeCounter.RootEventsSpanToString(); textBoxOutputLog.Text += endCompilationTime.ToLongTimeString() + @" End Compilation " + (_dslCompiler.CompilationLog.HasErrors ? @"with errors " : String.Empty) + @"after " + (endCompilationTime - startCompilationTime) + Environment.NewLine; FillErrorList(_dslCompiler.CompilationLog); FillWarningList(_dslCompiler.CompilationLog); UpdateInterface_SourceFilesList(); if (_dslCompiler.CompilationLog.HasErrors) { listViewErrors.SelectedIndices.Add(0); tabControl2.SelectedTab = tabPageErrors; MarkSelectedError(); } else { _astRoot = _dslCompiler.RootGMacAst; FillComponentsTree(); tabControl1.SelectedTab = tabPageComponents; } return(true); }
protected override void InitializeRootAst() { RootAst = new GMacAst(); RootGMacAst.InitializeAst(); }
internal static AstRoot ToAstRoot(this GMacAst ast) { return(new AstRoot(ast)); }
internal AstRoot(GMacAst ast) { AssociatedAst = ast; }
//public override void ResetOnAcquire() //{ // base.ResetOnAcquire(); // _generatedGMacSymbolTable = null; //} private void SetContext(GMacSymbolTranslatorContext context) { SetContext((SymbolTranslatorContext)context); _generatedGMacSymbolTable = context.GMacRootAst; }