public override Wrapper VisitExecution_step(PreposeGesturesParser.Execution_stepContext context) { var pose = GetPose(context.ID().GetText()); if (context.motion_constraint() != null && context.hold_constraint() != null) { var restriction = context.motion_constraint().GetText(); var motionConstraint = Wrapper.Convert(restriction); var duration = int.Parse(context.hold_constraint().NUMBER().GetText()); return (new Wrapper( new ExecutionStep( motionConstraint, pose, duration))); } if (context.motion_constraint() != null) { var restriction = context.motion_constraint().GetText(); var motionConstraint = Wrapper.Convert(restriction); return (new Wrapper( new ExecutionStep( motionConstraint, pose))); } if (context.hold_constraint() != null) { var duration = int.Parse(context.hold_constraint().NUMBER().GetText()); return (new Wrapper( new ExecutionStep( pose, duration))); } return(new Wrapper(new ExecutionStep(pose))); }
/// <summary> /// Exit a parse tree produced by <see cref="PreposeGesturesParser.execution_step"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitExecution_step([NotNull] PreposeGesturesParser.Execution_stepContext context) { }
/// <summary> /// Visit a parse tree produced by <see cref="PreposeGesturesParser.execution_step"/>. /// <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 VisitExecution_step([NotNull] PreposeGesturesParser.Execution_stepContext context) { return(VisitChildren(context)); }