Browse Source

Merge pull request #1544 from FancyKillerPanda/build_ignore

Changed `//+ignore` to `//+build ignore` and emit a warning for unknown tags
gingerBill 2 years ago
parent
commit
f7211408fc

+ 1 - 1
core/compress/gzip/example.odin

@@ -1,4 +1,4 @@
-//+ignore
+//+build ignore
 package gzip
 
 /*

+ 1 - 1
core/compress/zlib/example.odin

@@ -1,4 +1,4 @@
-//+ignore
+//+build ignore
 package zlib
 
 /*

+ 1 - 1
core/image/png/example.odin

@@ -8,7 +8,7 @@
 
 	An example of how to use `load`.
 */
-//+ignore
+//+build ignore
 package png
 
 import "core:image"

+ 1 - 1
core/intrinsics/intrinsics.odin

@@ -1,5 +1,5 @@
 // This is purely for documentation
-//+ignore
+//+build ignore
 package intrinsics
 
 // Package-Related

+ 0 - 2
core/math/big/internal.odin

@@ -25,8 +25,6 @@
 	TODO: Handle +/- Infinity and NaN.
 */
 
-
-//+ignore
 package math_big
 
 import "core:mem"

+ 1 - 1
core/math/big/tune.odin

@@ -7,7 +7,7 @@
 	The code started out as an idiomatic source port of libTomMath, which is in the public domain, with thanks.
 */
 
-//+ignore
+//+build ignore
 package math_big
 
 import "core:time"

+ 2 - 0
src/parser.cpp

@@ -5634,6 +5634,8 @@ bool parse_file(Parser *p, AstFile *f) {
 						} else {
 							f->flags |= AstFile_IsLazy;
 						}
+					} else {
+						warning(tok, "Ignoring unknown tag '%.*s'", LIT(lc));
 					}
 				}
 			}

+ 0 - 1
tests/core/math/big/test.odin

@@ -1,4 +1,3 @@
-//+ignore
 /*
 	Copyright 2021 Jeroen van Rijn <[email protected]>.
 	Made available under Odin's BSD-3 license.