aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorryuukk <ryuukk.dev@gmail.com>2023-06-26 03:49:32 +0200
committerryuukk <ryuukk.dev@gmail.com>2023-06-26 03:49:32 +0200
commit0f2b018accc59ba53c289576fbfcd3ca65dcba0f (patch)
treede128029ebe2600724e9afe4c583f5267e11d789 /src
parent0bb54d7b9cf217a1a6101508de3beb537f8b8a21 (diff)
Revert "cleanup"
This reverts commit 0bb54d7b9cf217a1a6101508de3beb537f8b8a21.
Diffstat (limited to 'src')
-rw-r--r--src/common/ast.odin13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/common/ast.odin b/src/common/ast.odin
index c8e2da5..d32b32f 100644
--- a/src/common/ast.odin
+++ b/src/common/ast.odin
@@ -314,20 +314,11 @@ collect_globals :: proc(
}
if ident != nil && implicit != nil {
- allowed := false
-
- if binary.op.text == "==" {
- allowed = ident.name == "ODIN_OS" &&
+ allowed :=
+ ident.name == "ODIN_OS" &&
implicit.field.name == fmt.tprint(ODIN_OS) ||
ident.name == "ODIN_ARCH" &&
implicit.field.name == fmt.tprint(ODIN_ARCH)
- } else if binary.op.text == "!=" {
- allowed = ident.name == "ODIN_OS" &&
- implicit.field.name != fmt.tprint(ODIN_OS) ||
- ident.name == "ODIN_ARCH" &&
- implicit.field.name != fmt.tprint(ODIN_ARCH)
- }
-
if allowed {
if block, ok := when_decl.body.derived.(^ast.Block_Stmt);
ok {