public DeclarationNode(LeafParser.Var_def_vContext ctx) { Line = ctx.Start.Line; _name = ctx.Id().GetText(); Mutable = ctx.Var() != null; Reference = ctx.Ref() != null; Value = ValueNode.Create(ctx.value()); if (ctx.type(0) != null) { Type = TypeNode.Create(ctx.type(0)); } if (ctx.type(1) != null) { Allocator = TypeNode.Create(ctx.type(1)); } }
public ScopeNode(LeafParser.Function_scopeContext ctx) { Line = ctx.Start.Line; if (ctx.value() != null) { AppendStatement(new ReturnNode { Value = ValueNode.Create(ctx.value()) }); return; } foreach (var statement in ctx.statement()) { AppendStatement(StatementNode.Create(statement)); } }
public IfNode(LeafParser.IfContext ctx) { Line = ctx.Start.Line; Check = ValueNode.Create(ctx.value()); Scope = new ScopeNode(ctx.conditional_scope(0)); if (ctx.Else() != null) { if (ctx.conditional_scope(1) != null) { Else = new ElseNode(ctx.conditional_scope(1)); } else { ElseIf = new ElseIfNode(ctx.@if()); } } }
void debuggedProcess_DebuggingPaused(object sender, ProcessEventArgs e) { OnIsProcessRunningChanged(EventArgs.Empty); using (new PrintTimes("Jump to current line")) { JumpToCurrentLine(); } if (currentTooltipRow != null && currentTooltipRow.IsShown) { using (new PrintTimes("Update tooltip")) { try { Utils.DoEvents(debuggedProcess); AbstractNode updatedNode = ValueNode.Create(currentTooltipExpression); currentTooltipRow.SetContentRecursive(updatedNode); } catch (AbortedBecauseDebuggeeResumedException) { } } } }
public WhileNode(LeafParser.WhileContext ctx) { Line = ctx.Start.Line; Check = ValueNode.Create(ctx.value()); Scope = new ScopeNode(ctx.conditional_scope()); }
public AssignmentNode(LeafParser.Var_assContext ctx) { Line = ctx.Start.Line; _lValue = ValueNode.Create(ctx.value(0)); _rValue = ValueNode.Create(ctx.value(1)); }
public ReturnNode(LeafParser.ReturnContext ctx) { Line = ctx.Start.Line; Value = ValueNode.Create(ctx.value()); }