Bump version, use variable for quine text

This commit is contained in:
Casey Rodarmor 2016-10-28 00:10:19 -07:00
parent 0a16803247
commit ec41eaf0e7
4 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "j"
version = "0.2.3"
version = "0.2.4"
authors = ["Casey Rodarmor <casey@rodarmor.com>"]
license = "WTFPL/MIT/Apache-2.0"
description = "a command runner"

View File

@ -34,10 +34,12 @@ quine: create
diff tmp/gen1.c tmp/gen2.c
@echo 'It was a quine!'
quine-text = "'int printf(const char*, ...); int main() { char *s = \"int printf(const char*, ...); int main() { char *s = %c%s%c; printf(s, 34, s, 34); return 0; }\"; printf(s, 34, s, 34); return 0; }'"
# create our quine
create:
mkdir -p tmp
echo 'int printf(const char*, ...); int main() { char *s = "int printf(const char*, ...); int main() { char *s = %c%s%c; printf(s, 34, s, 34); return 0; }"; printf(s, 34, s, 34); return 0; }' > tmp/gen0.c
echo {{quine-text}} > tmp/gen0.c
# clean up
clean:

View File

@ -21,7 +21,7 @@ macro_rules! die {
pub fn app() {
let matches = App::new("j")
.version("0.2.3")
.version("0.2.4")
.author("Casey R. <casey@rodarmor.com>")
.about("Just a command runner - https://github.com/casey/j")
.arg(Arg::with_name("list")

View File

@ -959,7 +959,6 @@ fn tokenize(text: &str) -> Result<Vec<Token>, Error> {
if escape || content_end >= rest.len() {
return error!(ErrorKind::UnterminatedString);
}
println!("{} {} {:?}", start, content_end, contents.chars().collect::<Vec<_>>());
(prefix, &rest[start..content_end + 1], StringToken)
} else if rest.starts_with("#!") {
return error!(ErrorKind::OuterShebang)