private void ProcessJumpF() { ExpressionSyntax expressionSyntax = PopVariable(); if (expressionSyntax == null) { return; } // start a new block for the if BlockSyntax ifBlock = BlockHelper.CreateNewBlock("if"); //add the if to the current block IfStatementSyntax ifStatement = SyntaxFactory.IfStatement(expressionSyntax, ifBlock); BlockHelper.AddToCurrentBlock(ifStatement); //current block is now the if BlockHelper.SetBlockAsCurrent(ifBlock); }
private void ParseOpCodes() { //add our base block to root BlockSyntax block = BlockHelper.CreateNewBlock("name"); //add block to root GlobalStatementSyntax globalStatement = SyntaxFactory.GlobalStatement(block); BlockHelper.Root = BlockHelper.Root.AddMembers(globalStatement); //set as current BlockHelper.SetBlockAsCurrent(block); OpCodeProcessor opCodeProcessor = new OpCodeProcessor(); opCodeProcessor.OpCodes = ParsedContent.OpCodeList; opCodeProcessor.VariableSet = this.variableSet; opCodeProcessor.ProcessOpCodes(); }