소스 검색

2002-07-25 Miguel de Icaza <[email protected]>

	* driver.cs: Rename --resource to --linkres, because that is what
	we do currently, we dont support --resource yet.

	* cs-tokenizer.cs: Fix test for reporting endif mismatches.

svn path=/trunk/mcs/; revision=6179
Miguel de Icaza 23 년 전
부모
커밋
09baafe8f3
3개의 변경된 파일25개의 추가작업 그리고 6개의 파일을 삭제
  1. 7 0
      mcs/mcs/ChangeLog
  2. 4 3
      mcs/mcs/cs-tokenizer.cs
  3. 14 3
      mcs/mcs/driver.cs

+ 7 - 0
mcs/mcs/ChangeLog

@@ -1,3 +1,10 @@
+2002-07-25  Miguel de Icaza  <[email protected]>
+
+	* driver.cs: Rename --resource to --linkres, because that is what
+	we do currently, we dont support --resource yet.
+
+	* cs-tokenizer.cs: Fix test for reporting endif mismatches.
+
 2002-07-25  Martin Baulig  <[email protected]>
 
 	* class.cs (MethodData): New public class.  This is a `method builder'

+ 4 - 3
mcs/mcs/cs-tokenizer.cs

@@ -1517,7 +1517,7 @@ namespace Mono.CSharp
 					any_token_seen |= tokens_seen;
 					tokens_seen = false;
 					if (c == -1)
-						Report.Error (1027, Location, "#endif expected");
+						Report.Error (1027, Location, "#endif/#endregion expected");
 					continue;
 				}
 				
@@ -1597,8 +1597,9 @@ namespace Mono.CSharp
 				return Token.ERROR;
 			}
 
-			if (ifstack != null && ifstack.Count > 1)
-				Report.Error (1027, Location, "#endif expected");
+			if (ifstack != null && ifstack.Count >= 1)
+				Report.Error (1027, Location, "#endif/#endregion expected");
+
 			return Token.EOF;
 		}
 	}

+ 14 - 3
mcs/mcs/driver.cs

@@ -171,7 +171,7 @@ namespace Mono.CSharp
 				"   --parse          Only parses the source file\n" +
 				"   --expect-error X Expect that error X will be encountered\n" +
 				"   --recurse SPEC   Recursively compiles the files in SPEC ([dir]/file)\n" + 
-				"   --resource FILE  Addds FILE as a resource\n" + 
+				"   --linkres FILE   Links FILE as a resource\n" + 
 				"   --stacktrace     Shows stack trace at error location\n" +
 				"   --target KIND    Specifies the target (KIND is one of: exe, winexe, " +
 				                     "library, module)\n" +
@@ -556,10 +556,10 @@ namespace Mono.CSharp
 				Report.Stacktrace = true;
 				return true;
 				
-			case "--resource":
+			case "--linkres":
 				if ((i + 1) >= args.Length){
 					Usage ();
-					Console.WriteLine("Missing argument to --resource"); 
+					Console.WriteLine("Missing argument to --linkres"); 
 					Environment.Exit (1);
 				}
 				if (resources == null)
@@ -778,6 +778,17 @@ namespace Mono.CSharp
 				return true;
 			}
 
+			case "/linkres":
+				if (value == ""){
+					Console.WriteLine ("/recurse requires an argument");
+					Environment.Exit (1);
+				}
+				if (resources == null)
+					resources = new ArrayList ();
+				
+				resources.Add (value);
+				return true;
+				
 			case "/recurse":
 				if (value == ""){
 					Console.WriteLine ("/recurse requires an argument");