예제 #1
0
        public override object VisitComment(RosMessageParser.CommentContext context)
        {
            string comment;

            if (context.ChildCount == 1)
            {
                comment = string.Empty;
            }
            else
            {
                comment = context.GetChild(1).GetText().Trim();
            }

            _listener.OnVisitComment(comment);
            return(comment);
        }
예제 #2
0
 /// <summary>
 /// Visit a parse tree produced by <see cref="RosMessageParser.comment"/>.
 /// <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 VisitComment([NotNull] RosMessageParser.CommentContext context)
 {
     return(VisitChildren(context));
 }
 /// <summary>
 /// Exit a parse tree produced by <see cref="RosMessageParser.comment"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitComment([NotNull] RosMessageParser.CommentContext context)
 {
 }