Пример #1
0
 public override Argument VisitErrorNode(IErrorNode node)
 {
     throw new ArgumentException("Invalid token '" + node.GetText());
 }
Пример #2
0
        //====================================================
        //Error Handling
        //====================================================

        public override string VisitErrorNode([NotNull] IErrorNode node)
        {
            ThrowUnsupportedError();
            throw new Exception($"Error Node reached with text {node.GetText()}.");
        }
Пример #3
0
 public override void VisitErrorNode([NotNull] IErrorNode node)
 {
     System.Diagnostics.Debug.WriteLine("TypeScan ERROR " + node.GetText());
     base.VisitErrorNode(node);
 }
Пример #4
0
 public override Expression VisitErrorNode(IErrorNode node)
 {
     writer($"{System.Reflection.MethodBase.GetCurrentMethod().Name} | {node.GetText()}");
     return(base.VisitErrorNode(node));
 }
Пример #5
0
 /// <inheritdoc />
 public override Result <FreezableStepProperty, IError> VisitErrorNode(IErrorNode node) =>
 ErrorCode.SCLSyntaxError.ToErrorBuilder(node.GetText())
 .WithLocationSingle(new TextLocation(node.Symbol));
Пример #6
0
 public override string VisitErrorNode(IErrorNode node)
 {
     this.stringBuilder.AppendLine(new string(' ', this.currentDepth) + "Error: '" + node.GetText());
     return(null);
 }
Пример #7
0
 public override AbstractNode VisitErrorNode(IErrorNode node)
 {
     throw new Exception("Error at " + node.GetText() + " " + node.Parent.SourceInterval);
 }