diff --git a/examples/basic.zplan b/examples/basic.zplan index c9330d5..2a5a0c8 100644 --- a/examples/basic.zplan +++ b/examples/basic.zplan @@ -4,10 +4,16 @@ * It is expected to be run from the root of the project tree. */ -task "tasks/echo.ztask" { - msg = "Hello from the wonderful world of zplans!" +task 'tasks/echo.ztask' { + msg = 'Hello from the wonderful world of zplans!' } -task "tasks/echo.ztask" { - msg = "This is nice" +task 'tasks/echo.ztask' { + msg = 'This is nice' +} + +task 'tasks/shell/bash.ztask' { + script = ''' + ls -lah + ''' } diff --git a/parser/src/plan.rs b/parser/src/plan.rs index 05c0607..08a470d 100644 --- a/parser/src/plan.rs +++ b/parser/src/plan.rs @@ -138,12 +138,18 @@ fn parse_str(parser: &mut Pairs) -> Result> { Rule::string => { return parse_str(&mut parsed.into_inner()); } + Rule::triple_quoted => { + return parse_str(&mut parsed.into_inner()); + } Rule::single_quoted => { return parse_str(&mut parsed.into_inner()); } Rule::inner_single_str => { return Ok(parsed.as_str().to_string()); } + Rule::inner_triple_str => { + return Ok(parsed.as_str().to_string()); + } _ => {} } }