From fcf77f01c70e4630921dacdefed268f635da6cb6 Mon Sep 17 00:00:00 2001 From: Ari Lazier Date: Thu, 12 Nov 2015 15:04:15 -0800 Subject: [PATCH] change argument syntax to use $ instead of {} --- parser/parser.cpp | 2 +- parser/test.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/parser/parser.cpp b/parser/parser.cpp index 5bc6e7d8..94e3f4b4 100644 --- a/parser/parser.cpp +++ b/parser/parser.cpp @@ -62,7 +62,7 @@ struct key_path : list< seq< sor< alpha, one< '_' > >, star< sor< alnum, one< '_ // argument struct argument_index : plus< digit > {}; -struct argument : seq< one< '{' >, must< argument_index, one< '}' > > > {}; +struct argument : seq< one< '$' >, must< argument_index > > {}; // expressions and operators struct expr : sor< dq_string, sq_string, number, argument, true_value, false_value, key_path > {}; diff --git a/parser/test.cpp b/parser/test.cpp index 830ad13a..b5fb6458 100644 --- a/parser/test.cpp +++ b/parser/test.cpp @@ -30,8 +30,8 @@ static std::vector valid_queries = { "_ = a", "_a = _.aZ", "a09._br.z = __-__.Z-9", - "{0} = {19}", - "{0} = {0}", + "$0 = $19", + "$0=$0", // operators "0=0", @@ -75,10 +75,10 @@ static std::vector invalid_queries = { "- = a", "a..b = a", "a$a = a", - "{} = {0}", - "{-1} = {0}", - "{a} = {0}", - "{ = }", + "{} = $0", + "$-1 = $0", + "$a = $0", + "$ = $", // operators "0===>0",