changeset 700:61b36d5895df

fix parser bugs
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 02 May 2016 21:54:24 -0600
parents aef51c3ebe50
children d0280c7fdc3a
files core/src/luan/impl/LuanParser.java
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
diff -r aef51c3ebe50 -r 61b36d5895df core/src/luan/impl/LuanParser.java
--- a/core/src/luan/impl/LuanParser.java	Mon May 02 21:12:30 2016 -0600
+++ b/core/src/luan/impl/LuanParser.java	Mon May 02 21:54:24 2016 -0600
@@ -1363,6 +1363,7 @@
 		exp = ExprZ(in);
 		if( exp==null )
 			return parser.failure();
+		exp.addNewLines();
 		builder.add(exp);
 		while( parser.match(',') ) {
 			Spaces();
@@ -1371,7 +1372,9 @@
 				builder.add(exp);
 				return parser.success();
 			}
-			builder.add( RequiredExpr(in) );
+			exp = RequiredExpr(in);
+			exp.addNewLines();
+			builder.add(exp);
 		}
 		return parser.success();
 	}
@@ -1741,7 +1744,11 @@
 
 	private boolean ContinueOnNextLine() {
 		parser.begin();
-		return parser.match('\\') &&  EndOfLine() ? parser.success() : parser.failure();
+		if( parser.match('\\') && EndOfLine() ) {
+			parser.upSb();
+			return parser.success();
+		} else
+			return parser.failure();
 	}
 
 	private boolean Comment() throws ParseException {