Beispiel #1
0
        public STObject Evaluate(InputSource source, Context context)
        {
            Source = source;
            try {
                Node root = source.Parse(Parser);

                if (root == null)
                    return STUndefinedObject.Instance; // parser found empty string so aborted

                if (STDebug.ShowParseTrees) {
                    var tr = Transcript.Instance;
                    if (tr != null)
                        root.PrintTo(tr.Out);
                    else
                        root.PrintTo(Console.Out);
                }

                return Evaluate (root, context);
            } finally {
                Source = null;
            }
        }
Beispiel #2
0
 public ParseException(InputSource source, int lineNumber, string message)
     : base(source, lineNumber, message)
 {
 }
Beispiel #3
0
 public CompileException(InputSource source, int lineNumber, string message, Exception innerException)
     : base(source, lineNumber, message, innerException)
 {
 }