aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2016-04-25 23:55:17 -0400
committerbnewbold <bnewbold@robocracy.org>2016-04-25 23:55:17 -0400
commitef9ee326260a902f600a2a83fbb785ee935ac904 (patch)
treef74c082b1a6e84577d58d666edf3f070e4c96c67
parent3586683bda805c5156649f760f26921b9d0a2250 (diff)
downloadspectrum-ef9ee326260a902f600a2a83fbb785ee935ac904.tar.gz
spectrum-ef9ee326260a902f600a2a83fbb785ee935ac904.zip
rust: allow extra/weird characters in identifiers
-rw-r--r--rust/spectrum.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/spectrum.rs b/rust/spectrum.rs
index 85d18b6..be41ca8 100644
--- a/rust/spectrum.rs
+++ b/rust/spectrum.rs
@@ -67,7 +67,7 @@ fn is_valid_identifier(s: &str) -> bool {
return false;
}
for (i, c) in s.chars().enumerate() {
- if !(c.is_alphabetic() || c == '-' || (c.is_numeric() && i > 0)) {
+ if !(c.is_alphabetic() || c == '*' || c == '?' || c == '!' || c == '-' || (c.is_numeric() && i > 0)) {
return false;
}
}