Lines Matching refs:err
8 #include "tools/gn/err.h"
56 Err* err) {
71 *err = Err(to_remove.origin()->GetRange(), "Item not found",
82 RemoveMatchesFromList(op_node, list, to_remove.list_value()[i], err);
83 if (err->has_error())
99 Err* err) {
109 *err = Err(op_node->left()->GetRange(), "Overwriting unused variable.",
112 err->AppendSubErr(Err(*scope->GetValue(left.value()),
127 *err = Err(op_node->left()->GetRange(), "Replacing nonempty list.",
131 err->AppendSubErr(Err(*old_value, "for previous definition",
140 if (err->has_error())
166 Err* err) {
234 *err = Err(op_node->op(), "Incompatible types to add.",
243 Err* err) {
249 *err = Err(left, "Undefined variable for +=.",
253 ValuePlusEquals(scope, op_node, left, left_value, right, false, err);
263 Err* err) {
283 RemoveMatchesFromList(op_node, left, right, err);
290 *err = Err(op_node->op(), "Incompatible types to add.",
299 Err* err) {
303 *err = Err(left, "Undefined variable for -=.",
307 ValueMinusEquals(op_node, left_value, right, false, err);
319 Err* err) {
321 ValuePlusEquals(scope, op_node, Token(), &ret, right, true, err);
330 Err* err) {
332 ValueMinusEquals(op_node, &ret, right, true, err);
343 Err* err) {
353 Err* err) {
355 Value result = ExecuteEqualsEquals(scope, op_node, left, right, err);
363 Err* err) {
364 *err = Err(op_node, "Comparison requires two integers.",
366 err->AppendRange(left.origin()->GetRange());
367 err->AppendRange(right.origin()->GetRange());
375 Err* err) {
377 return FillNeedsToIntegersError(op_node, left, right, err);
385 Err* err) {
387 return FillNeedsToIntegersError(op_node, left, right, err);
395 Err* err) {
397 return FillNeedsToIntegersError(op_node, left, right, err);
405 Err* err) {
407 return FillNeedsToIntegersError(op_node, left, right, err);
417 Err* err) {
426 Err* err) {
478 Err* err) {
487 Err* err) {
496 *err = Err(op, "Operator requires an lvalue.",
498 err->AppendRange(left->GetRange());
503 Value right_value = right->Execute(scope, err);
504 if (err->has_error())
507 *err = Err(op, "Operator requires an rvalue.",
509 err->AppendRange(right->GetRange());
514 return ExecuteEquals(scope, op_node, dest, right_value, err);
516 return ExecutePlusEquals(scope, op_node, dest, right_value, err);
518 return ExecuteMinusEquals(scope, op_node, dest, right_value, err);
524 Value left_value = left->Execute(scope, err);
525 if (err->has_error())
528 *err = Err(op, "Operator requires an value.",
530 err->AppendRange(left->GetRange());
536 Value right_value = right->Execute(scope, err);
537 if (err->has_error())
540 *err = Err(op, "Operator requires an value.",
542 err->AppendRange(right->GetRange());
548 return ExecuteMinus(scope, op_node, left_value, right_value, err);
550 return ExecutePlus(scope, op_node, left_value, right_value, err);
554 return ExecuteEqualsEquals(scope, op_node, left_value, right_value, err);
556 return ExecuteNotEquals(scope, op_node, left_value, right_value, err);
558 return ExecuteGreaterEquals(scope, op_node, left_value, right_value, err);
560 return ExecuteLessEquals(scope, op_node, left_value, right_value, err);
562 return ExecuteGreater(scope, op_node, left_value, right_value, err);
564 return ExecuteLess(scope, op_node, left_value, right_value, err);
568 return ExecuteOr(scope, op_node, left_value, right_value, err);
570 return ExecuteAnd(scope, op_node, left_value, right_value, err);