Author: mdiep
Date: Wed Sep 28 22:09:33 2005
New Revision: 9273

Modified:
   trunk/languages/tcl/lib/expression.pir
   trunk/languages/tcl/tcl.pir
Log:
- Print correct error message for [expr 2+]
- Only print one newline for errors in tclsh, not two


Modified: trunk/languages/tcl/lib/expression.pir
==============================================================================
--- trunk/languages/tcl/lib/expression.pir      (original)
+++ trunk/languages/tcl/lib/expression.pir      Wed Sep 28 22:09:33 2005
@@ -41,7 +41,10 @@ operand:
   goto operator
 
 no_operand:
-  .throw ("XXX: no operand!")
+  $S0 = "syntax error in expression \""
+  $S0 .= expr
+  $S0 .= "\": premature end of expression"
+  .throw ($S0)
 
 operator:
   (chunk, pos) = get_operator(expr, pos)

Modified: trunk/languages/tcl/tcl.pir
==============================================================================
--- trunk/languages/tcl/tcl.pir (original)
+++ trunk/languages/tcl/tcl.pir Wed Sep 28 22:09:33 2005
@@ -67,7 +67,6 @@ loop_error:
 loop_error_real:
   .get_stacktrace(P5,$S0)
   print $S0
-  print "\n"
   #goto input_loop_continue
 
 input_loop_continue:

Reply via email to