mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
TW-1806: project:ide is not allowed
- Thanks to Slaven ʙanovic.
This commit is contained in:
parent
53b526074f
commit
2720ea5a30
13 changed files with 36 additions and 9 deletions
1
AUTHORS
1
AUTHORS
|
@ -291,3 +291,4 @@ suggestions:
|
|||
Reg
|
||||
Yaroslav Molochko
|
||||
Michael Meier
|
||||
Slaven ʙanovic
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
pending tasks.
|
||||
- TW-1795 Calendar underline on Day padding
|
||||
(thanks to Renato Alves).
|
||||
- TW-1806 project:ide is not allowed
|
||||
(thanks to Slaven ʙanovic).
|
||||
- Added 'juhannus' as a synonym for 'midsommarafton'
|
||||
(thanks to Lynoure Braakman).
|
||||
- Deprecated the 'DUETODAY' virtual tag, which is a synonym for the 'TODAY'
|
||||
|
|
|
@ -387,7 +387,7 @@ void Eval::evaluatePostfixStack (
|
|||
// If there is more than one variant left on the stack, then the original
|
||||
// expression was not valid.
|
||||
if (values.size () != 1)
|
||||
throw std::string (STRING_EVAL_NO_EVAL);
|
||||
throw std::string (STRING_EVAL_NOT_EXPRESSION);
|
||||
|
||||
result = values[0];
|
||||
}
|
||||
|
|
|
@ -123,6 +123,8 @@ void ColumnProject::modify (Task& task, const std::string& value)
|
|||
Lexer::Type type;
|
||||
if (lexer.token (domRef, type) &&
|
||||
type == Lexer::Type::dom)
|
||||
{
|
||||
try
|
||||
{
|
||||
Eval e;
|
||||
e.addSource (domSource);
|
||||
|
@ -134,6 +136,19 @@ void ColumnProject::modify (Task& task, const std::string& value)
|
|||
task.set (_name, (std::string) v);
|
||||
context.debug (label + _name + " <-- '" + (std::string) v + "' <-- '" + value + "'");
|
||||
}
|
||||
catch (const std::string& e)
|
||||
{
|
||||
// If the expression failed because it didn't look like an expression,
|
||||
// simply store it as-is.
|
||||
if (e == STRING_EVAL_NOT_EXPRESSION)
|
||||
{
|
||||
task.set (_name, value);
|
||||
context.debug (label + _name + " <-- '" + value + "'");
|
||||
}
|
||||
else
|
||||
throw;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
task.set (_name, value);
|
||||
|
|
|
@ -681,6 +681,7 @@
|
|||
#define STRING_EVAL_UNSUPPORTED "Nicht unterstützter Operator: '{1}'."
|
||||
#define STRING_EVAL_OP_EXPECTED "Operator erwartet."
|
||||
#define STRING_EVAL_NO_EVAL "Der Ausdruck konnte nicht ausgewertet werden."
|
||||
#define STRING_EVAL_NOT_EXPRESSION "The value is not an expression."
|
||||
#define STRING_PAREN_MISMATCH "Ungültige Klammerung in Ausdruck."
|
||||
|
||||
// edit
|
||||
|
|
|
@ -679,6 +679,7 @@
|
|||
#define STRING_EVAL_UNSUPPORTED "Unsupported operator '{1}'."
|
||||
#define STRING_EVAL_OP_EXPECTED "Operator expected."
|
||||
#define STRING_EVAL_NO_EVAL "The expression could not be evaluated."
|
||||
#define STRING_EVAL_NOT_EXPRESSION "The value is not an expression."
|
||||
#define STRING_PAREN_MISMATCH "Mismatched parentheses in expression"
|
||||
|
||||
// edit
|
||||
|
|
|
@ -681,6 +681,7 @@
|
|||
#define STRING_EVAL_UNSUPPORTED "Ne subtenas infikson '{1}'."
|
||||
#define STRING_EVAL_OP_EXPECTED "Anticipis infikson."
|
||||
#define STRING_EVAL_NO_EVAL "Ne povis kalkuli la esprimon."
|
||||
#define STRING_EVAL_NOT_EXPRESSION "The value is not an expression."
|
||||
#define STRING_PAREN_MISMATCH "Malbalancataj parentezoj en esprimo"
|
||||
|
||||
// edit
|
||||
|
|
|
@ -690,6 +690,7 @@
|
|||
#define STRING_EVAL_UNSUPPORTED "Operador no soportado '{1}'."
|
||||
#define STRING_EVAL_OP_EXPECTED "Se esperaba operador."
|
||||
#define STRING_EVAL_NO_EVAL "La expresión podría no ser evaluada."
|
||||
#define STRING_EVAL_NOT_EXPRESSION "The value is not an expression."
|
||||
#define STRING_PAREN_MISMATCH "Paréntesis desemparejados en expresión"
|
||||
|
||||
// edit
|
||||
|
|
|
@ -681,6 +681,7 @@
|
|||
#define STRING_EVAL_UNSUPPORTED "Unsupported operator '{1}'."
|
||||
#define STRING_EVAL_OP_EXPECTED "Operator expected."
|
||||
#define STRING_EVAL_NO_EVAL "The expression could not be evaluated."
|
||||
#define STRING_EVAL_NOT_EXPRESSION "The value is not an expression."
|
||||
#define STRING_PAREN_MISMATCH "Mismatched parentheses in expression"
|
||||
|
||||
// edit
|
||||
|
|
|
@ -680,6 +680,7 @@
|
|||
#define STRING_EVAL_UNSUPPORTED "Operatore non supportato '{1}'."
|
||||
#define STRING_EVAL_OP_EXPECTED "Operator expected."
|
||||
#define STRING_EVAL_NO_EVAL "The expression could not be evaluated."
|
||||
#define STRING_EVAL_NOT_EXPRESSION "The value is not an expression."
|
||||
#define STRING_PAREN_MISMATCH "Mismatched parentheses in expression"
|
||||
|
||||
// edit
|
||||
|
|
|
@ -681,6 +681,7 @@
|
|||
#define STRING_EVAL_UNSUPPORTED "Unsupported operator '{1}'."
|
||||
#define STRING_EVAL_OP_EXPECTED "Operator expected."
|
||||
#define STRING_EVAL_NO_EVAL "式を評価出来ません。"
|
||||
#define STRING_EVAL_NOT_EXPRESSION "The value is not an expression."
|
||||
#define STRING_PAREN_MISMATCH "Mismatched parentheses in expression"
|
||||
|
||||
// edit
|
||||
|
|
|
@ -681,6 +681,7 @@
|
|||
#define STRING_EVAL_UNSUPPORTED "Niewspierany operator '{1}'."
|
||||
#define STRING_EVAL_OP_EXPECTED "Oczekiwany operator."
|
||||
#define STRING_EVAL_NO_EVAL "Wyrażenie nie może być przetworzone."
|
||||
#define STRING_EVAL_NOT_EXPRESSION "The value is not an expression."
|
||||
#define STRING_PAREN_MISMATCH "Niedopasowane nawiasy w wyrażeniu"
|
||||
|
||||
// edit
|
||||
|
|
|
@ -681,6 +681,7 @@
|
|||
#define STRING_EVAL_UNSUPPORTED "Operador não suportado '{1}'."
|
||||
#define STRING_EVAL_OP_EXPECTED "Operador em falta."
|
||||
#define STRING_EVAL_NO_EVAL "Não foi possível calcular a expressão."
|
||||
#define STRING_EVAL_NOT_EXPRESSION "The value is not an expression."
|
||||
#define STRING_PAREN_MISMATCH "Parentesis incompatíveis na expressão."
|
||||
|
||||
// edit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue