Lines Matching +full:check +full:- +full:formatting
26 // ------------------------------------------------------
27 // Formatting
29 // The result of formatting a literal is just itself.
66 // Check if it's local or global in formatOperand()
72 // see https://github.com/unicode-org/message-format-wg/issues/299 in formatOperand()
76 // `var` is a local -- look it up in formatOperand()
81 // Variable wasn't found in locals -- check if it's global in formatOperand()
85 // Unbound variable -- set a resolution error in formatOperand()
88 …// https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#fallback-resoluti… in formatOperand()
126 optionsVector->adoptElement(resolvedOpt.orphan(), status); in resolveOptions()
150 const UnicodeString& type = obj->tag(); in evalFormatterCall()
153 // No formatter for this type -- follow default behavior in evalFormatterCall()
169 // -- just return the argument itself in evalFormatterCall()
204 // Other errors are non-recoverable in evalFormatterCall()
210 …FormattedPlaceholder result = formatterImpl->format(std::move(argument), std::move(options), statu… in evalFormatterCall()
220 // as a formatting error, except for operand mismatch errors in evalFormatterCall()
235 // No formatter with this name -- set error in evalFormatterCall()
244 // Per https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#fallback-resol…
249 const Reserved& r = rator->asReserved(); in reservedFallback()
271 // Formatting error in formatExpression()
294 const FunctionName& functionName = rator->getFunctionName(); in formatExpression()
295 const OptionMap& options = rator->getOptionsInternal(); in formatExpression()
330 // unformatted input (or formatting numbers as strings) in formatPattern()
333 // Handle formatting errors. `formatToString()` can't take a context and thus can't in formatPattern()
346 // ------------------------------------------------------
349 // See https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#resolve-select…
357 // (Implicit, since `res` is an out-parameter) in resolveSelectors()
385 // See https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#resolve-prefer…
427 selectorImpl->selectKey(rv.takeArgument(), rv.takeOptions(), in matchSelectorKeys()
457 // See https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#resolve-prefer…
464 // (Implicit, since `pref` is an out-parameter) in resolvePreferences()
482 U_ASSERT(i < selectorKeys.len); // established by semantic check in formatSelectors() in resolvePreferences()
484 // 2ii(b). If `key` is not the catch-all key '*' in resolvePreferences()
493 keys->adoptElement(ksP.orphan(), status); in resolvePreferences()
514 return -1; in vectorFind()
518 return (vectorFind(v, k) != -1); in vectorContains()
521 // See https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#filter-variants
527 // (Not needed since `vars` is an out-parameter) in filterVariants()
542 // 2i(b). If key is the catch-all key '*': in filterVariants()
565 …PrioritizedVariant* tuple = create<PrioritizedVariant>(PrioritizedVariant(-1, selectorKeys, p), st… in filterVariants()
572 // See https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#sort-variants
574 // Note: this sorts in-place, so `sortable` is just `vars`
579 // Note: steps 1 and 2 are omitted since we use `vars` as `sortable` (we sort in-place) in sortVariants()
581 // (Not needed since `sortable` is an out-parameter) in sortVariants()
583 // 2i. Let tuple be a new tuple (-1, var). in sortVariants()
588 // 4. Let `i` be `len` - 1. in sortVariants()
589 int32_t i = len - 1; in sortVariants()
607 // 5iii(c) If `key` is not the catch-all key '*': in sortVariants()
623 // 5v. Set `i` to be `i` - 1. in sortVariants()
624 i--; in sortVariants()
654 // Either this is a global var or an unbound var -- in resolveVariables()
656 // Check globals in resolveVariables()
660 // Unresolved variable -- could be a previous warning. Nothing to resolve in resolveVariables()
668 // Evaluate the expression except for not performing the top-level function call
684 // Function call -- resolve the operand and options in resolveVariables()
688 // Already checked that rator is non-reserved in resolveVariables()
689 const FunctionName& selectorName = rator->getFunctionName(); in resolveVariables()
693 …FunctionOptions resolvedOptions = resolveOptions(env, rator->getOptionsInternal(), context, status… in resolveVariables()
703 // Non-selector used as selector; an error would have been recorded earlier in resolveVariables()
728 // Check if there was an error in formatSelectorExpression()
731 // create a valid (non-fallback) formatted placeholder from the in formatSelectorExpression()
750 …// See https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#pattern-selec… in formatSelectors()
772 // which is sorted in-place in formatSelectors()
778 …U_ASSERT(vars->size() > 0); // This should have been checked earlier (having 0 variants would be a… in formatSelectors()
779 const PrioritizedVariant& var = *(static_cast<PrioritizedVariant*>(vars->elementAt(0))); in formatSelectors()
787 // Note: this is non-const due to the function registry being non-const, which is in turn
789 // In other words, formatting a message can mutate the underlying `MessageFormatter` by changing
799 // Check for unresolved variable errors in formatToString()
807 … // Check for errors/warnings -- if so, then the result of pattern selection is the fallback value in formatToString()
808 …// See https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#pattern-selec… in formatToString()
816 // Update status according to all errors seen while formatting in formatToString()
821 // ----------------------------------------
824 void MessageFormatter::check(MessageContext& context, const Environment& localEnv, const OptionMap&… in check() function in message2::MessageFormatter
825 // Check the RHS of each option in check()
829 check(context, localEnv, opt.getValue(), status); in check()
833 void MessageFormatter::check(MessageContext& context, const Environment& localEnv, const Operand& r… in check() function in message2::MessageFormatter
834 // Nothing to check for literals in check()
839 // Check that variable is in scope in check()
841 // Check local scope in check()
845 // Check global scope in check()
856 void MessageFormatter::check(MessageContext& context, const Environment& localEnv, const Expression… in check() function in message2::MessageFormatter
857 // Check for unresolved variable errors in check()
862 check(context, localEnv, rand, status); in check()
863 check(context, localEnv, rator->getOptionsInternal(), status); in check()
867 // Check for resolution errors
877 check(context, *env, rhs, status); in checkDeclarations()