public void Visit(ISyntaxContext context, IVisitRuler visitRuler, BinaryWriter writer)
 {
     foreach (var arg in _arguments)
     {
         arg.Visit(context, Keyword.VisitRuler, writer);
     }
 }
        public override void Visit(ISyntaxContext context, IVisitRuler visitRuler, BinaryWriter writer)
        {
            if (_index < 0 || _index >= context.Current.Arguments.Count)
            {
                throw new SyntaxCheckException(String.Format(SyntaxErrorMessages.CheckParameterIndexInvalid, _index), SyntaxErrorType.SYNTAX_ERROR_ARGUMENTS, context.Document, context.CheckingOffset, context.CheckingLength);
            }
            var argument = context.Current.Arguments[_index];

            argument.Visit(context, visitRuler, writer);
        }
Beispiel #3
0
 /// <summary>
 /// 通用访问逻辑
 /// </summary>
 /// <param name="context"></param>
 /// <param name="visitRuler"></param>
 /// <param name="writer"></param>
 public virtual void Visit(ISyntaxContext context, IVisitRuler visitRuler, BinaryWriter writer)
 {
     visitRuler.Previsit(context, writer);
     if (visitRuler.Override)
     {
         visitRuler.Visit(context, writer);
     }
     else
     {
         Visit(context, writer);
     }
     visitRuler.Postvisit(context, writer);
 }
 public override void Visit(ISyntaxContext context, IVisitRuler visitRuler, BinaryWriter writer)
 {
     _innerToken.Visit(context, visitRuler, writer);
 }