MAINT: TODO cleanups.

This commit is contained in:
Jeremy Wall 2018-08-15 18:49:11 -05:00
parent ca982dfc02
commit ed87ca353b
5 changed files with 3 additions and 12 deletions

View File

@ -499,7 +499,6 @@ fn test_eval_selector_list_expr() {
);
}
// TODO(jwall): Eval for tuple and list.
// Include nested for each.
#[test]
#[should_panic(expected = "Unable to find tpl1")]

View File

@ -37,8 +37,6 @@ impl ExecConverter {
ExecConverter {}
}
// TODO(jwall): We may want to include an built in exec macro for
// creating an exec tuple.
#[allow(unused_assignments)]
fn write(&self, v: &Val, w: &mut Write) -> Result {
// We always expect the Val to be a Tuple.
@ -128,7 +126,6 @@ impl ExecConverter {
try!(write!(script, "# Turn on unofficial Bash-Strict-Mode\n"));
try!(write!(script, "set -euo pipefail\n"));
// 3. Then assign our environment variables
// TODO(jwall): We should escape bash ENV variable values.
if let Some(env_list) = env {
for &(ref name, ref v) in env_list.iter() {
// We only allow string fields in our env tuple.

View File

@ -77,9 +77,7 @@ fn main() {
let mut builder = build::Builder::new(root.parent().unwrap(), cache);
match ConverterRunner::new(target) {
Ok(converter) => {
// TODO(jwall): What should happen if they requested we build a _test.ucg file.
// 1. We could automatically go into validate mode.
// 2. We could warn that this is a test file.
// TODO(jwall): We should warn if this is a test file.
let result = builder.build_file(file);
if !result.is_ok() {
eprintln!("{:?}", result.err().unwrap());
@ -108,10 +106,7 @@ fn main() {
}
}
} else if let Some(matches) = app.subcommand_matches("build") {
// TODO(jwall): This should take multiple files I think.
let files = matches.values_of("INPUT").unwrap();
// TODO(jwall): We should default to the file name with appropriate
// extension if this is not set.
for file in files {
let root = PathBuf::from(file);
let mut builder = build::Builder::new(root.parent().unwrap(), cache);

View File

@ -121,13 +121,14 @@ fn triple_to_number(v: (Option<Token>, Option<Token>, Option<Token>)) -> ParseRe
};
let to_parse = pref.to_string() + "." + &suf;
// TODO(jwall): if there is an error we should report where that error occured.
let f = match FromStr::from_str(&to_parse) {
Ok(f) => f,
Err(_) => {
return Err(error::Error::new(
format!("Not a float! {}", to_parse),
error::ErrorType::UnexpectedToken,
// NOTE(jwall): This is ugly. I should probably see if I can refactor
// it to something less confusing.
maybepos.unwrap(),
))
}

View File

@ -400,7 +400,6 @@ pub fn op_expression(i: TokenIter) -> NomResult<Expression> {
IResult::Error(e) => IResult::Error(e),
IResult::Incomplete(i) => IResult::Incomplete(i),
IResult::Done(rest, oplist) => {
// TODO run our binary parsing.
let mut i_ = OpListIter {
source: oplist.as_slice(),
};