changeset 15:bb59d7ea223b

minor git-svn-id: https://luan-java.googlecode.com/svn/trunk@16 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Thu, 29 Nov 2012 07:59:17 +0000
parents 2ddf85634d20
children 2a30281ef47c
files src/luan/interp/LuaParser.java
diffstat 1 files changed, 2 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/luan/interp/LuaParser.java	Mon Nov 26 10:18:46 2012 +0000
+++ b/src/luan/interp/LuaParser.java	Thu Nov 29 07:59:17 2012 +0000
@@ -669,7 +669,7 @@
 		return Sequence(
 			"--[",
 			ZeroOrMore('='),
-			setN(n),
+			n.set(matchLength()),
 			'[',
 			ZeroOrMore(
 				TestNot(CommentEnd(n)),
@@ -680,15 +680,7 @@
 	}
 
 	Rule CommentEnd(Var<Integer> n) {
-		return Sequence( ']', ZeroOrMore('='), eqN(n), ']' );
-	}
-
-	boolean setN(Var<Integer> n) {
-		return n.set(matchLength());
-	}
-
-	boolean eqN(Var<Integer> n) {
-		return n.get()==matchLength();
+		return Sequence( ']', ZeroOrMore('='), n.get()==matchLength(), ']' );
 	}
 
 	// for debugging