浏览代码

Don't skip eols. Fixes #336.

woollybah 7 年之前
父节点
当前提交
4cebab922c
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      parser.bmx

+ 2 - 4
parser.bmx

@@ -446,7 +446,7 @@ Type TParser Extends TGenProcessor
 			Case "~n"
 				Return "end-of-line"
 		End Select
-		Return toke
+		Return "'" + toke + "'"
 	End Method
 
 	Method CParse:Int( toke$ )
@@ -1412,7 +1412,7 @@ Type TParser Extends TGenProcessor
 				_app.mapStringConsts(BmxUnquote( _toke ))
 				NextToke
 			Default
-				Err "Expecting expression but encountered '"+_toke+"'"
+				Err "Expecting expression but encountered "+DescribeToke(_toke)
 			End Select
 		End Select
 
@@ -1478,8 +1478,6 @@ Type TParser Extends TGenProcessor
 
 	Method ParseUnaryExpr:TExpr()
 
-		SkipEols
-
 		Local op$=_toke
 		Select op
 		Case "+","-","~~","not"