コード例 #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
ファイル: SCLParsing.cs プロジェクト: reductech/Core
 /// <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);
 }