//TODO: Crysl JSON schema needs to be changed to support the below condition

        /*public override object VisitWithPropertiesOnly(CryslGrammarParser.WithPropertiesOnlyContext context)
         * {
         *  if (_cryslJsonModel.EventValueSig == null)
         *  {
         *      _cryslJsonModel.EventsValue.Add(
         *          new Dictionary<object, object>
         *          {
         *              {"crypto_signature", _cryslJsonModel.EventSigValues = new List<Dictionary<object, object>>()}
         *          });
         *  }
         *  foreach (var varName in context.VARNAME())
         *  {
         *      //Check for crypto signature identifiers
         *      if (varName.Symbol.TokenIndex < context.COLON().Symbol.TokenIndex)
         *      {
         *          _cryslJsonModel.EventSigValues.Add(
         *              new Dictionary<object, object>
         *              {
         *                  {"event_var_name", varName.GetText() }
         *              });
         *      }
         *      //Check for crypto signature methods
         *      else if (varName.Symbol.TokenIndex > context.COLON().Symbol.TokenIndex && )
         *      {
         *          _cryslJsonModel.EventSigValues.Add(
         *              new Dictionary<object, object>
         *              {
         *                  {"method_name", varName.GetText() }
         *
         *              });
         *      }
         *  }
         *  return 0;
         * }*/

        //TODO: Crysl JSON schema needs to be changed to support the below condition

        /*public override int VisitSngEventNoArguments(CryslGrammarParser.SngEventNoArgumentsContext context)
         * {
         *  return base.VisitSngEventNoArguments(context);
         * }*/

        //TODO: Crysl JSON schema needs to be changed to support the below condition

        /*public override int VisitSngEventWithoutArguments(CryslGrammarParser.SngEventWithoutArgumentsContext context)
         * {
         *  return base.VisitSngEventWithoutArguments(context);
         * }*/

        //TODO: Crysl JSON schema needs to be changed to support the below condition

        /*public override int VisitSngEventWithArgumentsUnscore(CryslGrammarParser.SngEventWithArgumentsUnscoreContext context)
         * {
         *  return base.VisitSngEventWithArgumentsUnscore(context);
         * }*/

        //TODO: Crysl JSON schema needs to be changed to support the below condition

        /*public override int VisitSngEventWithArgumentsVarname(CryslGrammarParser.SngEventWithArgumentsVarnameContext context)
         * {
         *  return base.VisitSngEventWithArgumentsVarname(context);
         * }*/
        #endregion
        #endregion

        #region ORDER SECTION
        public override object VisitOrderssection(CryslGrammarParser.OrderssectionContext context)
        {
            SectionOrder orderSection = new SectionOrder();
            string       sectionName  = context.ORDERSSECTIONNAME().GetText();

            orderSection.Crysl_Section = sectionName;

            List <EventOrder> eventOrder = (List <EventOrder>)Visit(context.orderlist());

            orderSection.Event_Order = eventOrder;

            cryslModel.Order_Section = orderSection;

            return(0);
        }
Beispiel #2
0
 /// <summary>
 /// Visit a parse tree produced by <see cref="CryslGrammarParser.orderssection"/>.
 /// <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 VisitOrderssection([NotNull] CryslGrammarParser.OrderssectionContext context)
 {
     return(VisitChildren(context));
 }