unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 4ecde07d4262dbed57b8251ea2a40f2abc46908c 2093 bytes (raw)
name: gnu/packages/patches/mono-6.12.0-fix-ConditionParser.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
 
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs
index b5e2e809ae4..757492d15e4 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs
@@ -205,19 +205,30 @@ ConditionExpression ParseFunctionExpression (string function_name)
 		{
 			List <ConditionFactorExpression> list = new List <ConditionFactorExpression> ();
 			ConditionFactorExpression e;
-			
+
+            /* starts looking at the open paren, move past it */
+            tokenizer.GetNextToken ();
+            if (tokenizer.Token.Type == TokenType.RightParen) {
+                /* leave us looking past the end of the argument list */
+                tokenizer.GetNextToken ();
+                return list;
+            }
 			while (true) {
-				tokenizer.GetNextToken ();
-				if (tokenizer.Token.Type == TokenType.RightParen) {
-					tokenizer.GetNextToken ();
-					break;
-				}
-				if (tokenizer.Token.Type == TokenType.Comma)
+                e = (ConditionFactorExpression) ParseFactorExpression ();
+                list.Add (e);
+                /* ParseFactorExpression leaves us looking at what follows the
+                 * expression */
+                if (tokenizer.Token.Type == TokenType.RightParen) {
+                    /* leave us looking past the end of the argument list */
+                    tokenizer.GetNextToken ();
+                    break;
+                }
+                if (tokenizer.Token.Type == TokenType.Comma) {
+                    tokenizer.GetNextToken ();
 					continue;
-					
-				tokenizer.Putback (tokenizer.Token);
-				e = (ConditionFactorExpression) ParseFactorExpression ();
-				list.Add (e);
+                }
+
+                throw new ExpressionParseException (String.Format ("Unexpected token {0} in argument list while parsing condition \"{1}\"", tokenizer.Token, conditionStr));
 			}
 			
 			return list;

debug log:

solving 4ecde07d42 ...
found 4ecde07d42 in https://yhetil.org/guix-patches/iMoekcfwEfCp2uLTWzr-P2_OVyzTF-420AoXae5W6GK2kP5NvueOXBRzAIJBRN2U0c7Sl0HUzUy8eKWNuTs2uaiapCUkJUo5Ng9ahfsfGZ8=@proton.me/

applying [1/1] https://yhetil.org/guix-patches/iMoekcfwEfCp2uLTWzr-P2_OVyzTF-420AoXae5W6GK2kP5NvueOXBRzAIJBRN2U0c7Sl0HUzUy8eKWNuTs2uaiapCUkJUo5Ng9ahfsfGZ8=@proton.me/
diff --git a/gnu/packages/patches/mono-6.12.0-fix-ConditionParser.patch b/gnu/packages/patches/mono-6.12.0-fix-ConditionParser.patch
new file mode 100644
index 0000000000..4ecde07d42

1:12: space before tab in indent.
 		{
1:13: space before tab in indent.
 			List <ConditionFactorExpression> list = new List <ConditionFactorExpression> ();
1:14: space before tab in indent.
 			ConditionFactorExpression e;
1:15: trailing whitespace.
-			
1:24: space before tab in indent.
 			while (true) {
Checking patch gnu/packages/patches/mono-6.12.0-fix-ConditionParser.patch...
Applied patch gnu/packages/patches/mono-6.12.0-fix-ConditionParser.patch cleanly.
warning: squelched 5 whitespace errors
warning: 10 lines add whitespace errors.

index at:
100644 4ecde07d4262dbed57b8251ea2a40f2abc46908c	gnu/packages/patches/mono-6.12.0-fix-ConditionParser.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).