public override TestFramework VisitNode_stmt([NotNull] DOTParser.Node_stmtContext context) { TestUnitInfo info = new TestUnitInfo(context.node_id().GetText()); foreach (var attribute in GetKeyValuePairs(context.attr_list())) { switch (attribute.Key) { case "color": { // 'green' implies that the test is explicitly enabled by default // 'yellow' implies that it is enabled, but *may* be disabled info.DefaultEnabled = (attribute.Value == "green"); break; } case "label": { // Parse BOOST Test specific content info.Parse(attribute.Value.Trim('"')); break; } } } ; this.Context.TestUnits.Push(info); return(base.VisitNode_stmt(context)); }
public override void ExitNode_stmt(DOTParser.Node_stmtContext context) { OnRuleLeave(Rule.Node, context.GetText()); base.ExitNode_stmt(context); }
/// <summary> /// Exit a parse tree produced by <see cref="DOTParser.node_stmt"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitNode_stmt([NotNull] DOTParser.Node_stmtContext context) { }
public override void EnterNode_stmt(DOTParser.Node_stmtContext context) { OnRuleEnter(Rule.Node, context.GetText()); base.EnterNode_stmt(context); }
/// <summary> /// Visit a parse tree produced by <see cref="DOTParser.node_stmt"/>. /// <para> /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/> /// on <paramref name="context"/>. /// </para> /// </summary> /// <param name="context">The parse tree.</param> /// <return>The visitor result.</return> public virtual Result VisitNode_stmt([NotNull] DOTParser.Node_stmtContext context) { return(VisitChildren(context)); }