mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[poincare] Throw a bison error when functions have wrong number of
arguments Change-Id: I33f0a9b7cad3b1fde2df25ecfdc568187b79f248
This commit is contained in:
@@ -38,11 +38,10 @@ bool TextFieldDelegateApp::textFieldShouldFinishEditing(TextField * textField, I
|
||||
bool TextFieldDelegateApp::textFieldDidReceiveEvent(TextField * textField, Ion::Events::Event event) {
|
||||
if (textField->textFieldShouldFinishEditing(event) && textField->isEditing()) {
|
||||
Expression * exp = Expression::parse(textField->text());
|
||||
bool invalidText = (exp == nullptr || !exp->hasValidNumberOfArguments());
|
||||
if (exp != nullptr) {
|
||||
delete exp;
|
||||
}
|
||||
if (invalidText) {
|
||||
if (exp == nullptr) {
|
||||
textField->app()->displayWarning(I18n::Message::SyntaxError);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user