Skip to content

Commit

Permalink
remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
StunxFS committed Dec 25, 2023
1 parent 7a5b352 commit 20d3f9e
Showing 1 changed file with 2 additions and 54 deletions.
56 changes: 2 additions & 54 deletions lib/rivet/src/ast/Env.ri
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (C) 2023-present Jose Mendoza - All rights reserved. Use of this
// source code is governed by an MIT license that can be found in the LICENSE
// Copyright (C) 2023-present Jose Mendoza - All rights reserved. Use of this
// source code is governed by an MIT license that can be found in the LICENSE
// file.

import std/sys;
Expand Down Expand Up @@ -180,56 +180,4 @@ pub struct Env {
}
return new_inputs;
}

pub func evalue_pp_symbol(self, name: string, pos: token.Pos) -> bool {
match name {
// operating systems
"_LINUX_", "_WINDOWS_" -> {
return if os := sys.OS.from_string(name) {
os == self.prefs.target_os
} else {
false
};
},
// architectures
"_X86_", "_AMD64_" -> {
return if os := sys.Arch.from_string(name) {
os == self.prefs.target_arch
} else {
false
};
},
// bits
"_x32_", "_x64_" -> {
return if name == "_x32_" {
!self.prefs.target_is_64bit
} else {
self.prefs.target_is_64bit
};
},
// endian
"_LITTLE_ENDIAN_", "_BIG_ENDIAN_" -> {
return if name == "_LITTLE_ENDIAN_" {
self.prefs.target_is_little_endian
} else {
!self.prefs.target_is_little_endian
};
},
// optimize modes
"_DEBUG_", "_RELEASE_" -> {
return if name == "_DEBUG_" {
self.prefs.optimize_mode == .Debug
} else {
self.prefs.optimize_mode == .Release
};
},
"_TESTS_" -> return self.prefs.is_test,
else -> return if name.starts_with("_") && name.ends_with("_") {
report.error("unknown builtin flag: `{}`".fmt(name), pos);
false
} else {
name in self.prefs.flags
}
}
}
}

0 comments on commit 20d3f9e

Please sign in to comment.