class CppFeedbackHook::CppExplainer

Public Instance Methods

error() click to toggle source
# File lib/feedback_hook.rb, line 15
def error()
  '[eE]rror:'
end
explain_call_of_overloaded_is_ambiguous(_, result) click to toggle source
# File lib/feedback_hook.rb, line 73
def explain_call_of_overloaded_is_ambiguous(_, result)
  (/#{error} call of overloaded '(.*)' is ambiguous#{near_regex}/.match result).try do |it|
    {target: it[1], near: it[2]}
  end
end
explain_does_not_a_type(_, result) click to toggle source
# File lib/feedback_hook.rb, line 31
def explain_does_not_a_type(_, result)
  (/#{error} '(.*)' does not name a type#{near_regex}/.match result).try do |it|
    {type: it[1], near: it[2]}
  end
end
explain_expected_after_struct_definition(_, result) click to toggle source
# File lib/feedback_hook.rb, line 85
def explain_expected_after_struct_definition(_, result)
  (/#{error} expected ';' after struct definition#{near_regex}/.match result).try do |it|
    {near: it[1]}
  end
end
explain_expected_at_end_of_member(_, result) click to toggle source
# File lib/feedback_hook.rb, line 97
def explain_expected_at_end_of_member(_, result)
  (/#{error} expected '(.*)' at end of member declaration#{near_regex}/.match result).try do |it|
    {token: it[1], near: it[2]}
  end
end
explain_expected_comma_before_token(_, result) click to toggle source
# File lib/feedback_hook.rb, line 49
def explain_expected_comma_before_token(_, result)
  (/#{error} expected ',' or '.{3}' before '\.' token#{near_regex}/.match result).try do |it|
    {near: it[1]}
  end
end
explain_expected_initializer_before(_, result) click to toggle source
# File lib/feedback_hook.rb, line 91
def explain_expected_initializer_before(_, result)
  (/#{error} expected initializer before '(.*)'#{near_regex}/.match result).try do |it|
    {near: it[2]}
  end
end
explain_expected_initializer_before_token(_, result) click to toggle source
# File lib/feedback_hook.rb, line 55
def explain_expected_initializer_before_token(_, result)
  (/#{error} expected initializer before '.' token#{near_regex}/.match result).try do |it|
    {near: it[1]}
  end
end
explain_expected_unqualified_id(_, result) click to toggle source
# File lib/feedback_hook.rb, line 103
def explain_expected_unqualified_id(_, result)
  (/#{error} expected unqualified-id before '(.*)' token#{near_regex}/.match result).try do |it|
    {token: it[1], near: it[2]}
  end
end
explain_has_incomplete_type_and_cannot_be_defined(_, result) click to toggle source
# File lib/feedback_hook.rb, line 37
def explain_has_incomplete_type_and_cannot_be_defined(_, result)
  (/#{error} aggregate '(.*)' has incomplete type and cannot be defined#{near_regex}/.match result).try do |it|
    {type: it[1], near: it[2]}
  end
end
explain_has_no_member_named(_, result) click to toggle source
# File lib/feedback_hook.rb, line 19
def explain_has_no_member_named(_, result)
  (/#{error} '(.*)' has no member named '(.*?)'#{near_regex}/.match result).try do |it|
    {type: it[1], target: it[2], near: it[3]}
  end
end
explain_invalid_conversion_from_to(_, result) click to toggle source
# File lib/feedback_hook.rb, line 79
def explain_invalid_conversion_from_to(_, result)
  (/#{error} invalid conversion from '(.*)' to '(.*)'#{near_regex}/.match result).try do |it|
    {expected: it[1], actual: it[2], near: it[3]}
  end
end
explain_invalid_suffix(_, result) click to toggle source
# File lib/feedback_hook.rb, line 43
def explain_invalid_suffix(_, result)
  (/#{error} expected unqualified-id before numeric constant#{near_regex}/.match result).try do |it|
    {near: it[1]}
  end
end
explain_too_few_arguments_to_function(_, result) click to toggle source
# File lib/feedback_hook.rb, line 67
def explain_too_few_arguments_to_function(_, result)
  (/#{error} too few arguments to function '(.*)'#{near_regex}/.match result).try do |it|
    {target: it[1], near: it[2]}
  end
end
explain_too_many_arguments_to_function(_, result) click to toggle source
# File lib/feedback_hook.rb, line 61
def explain_too_many_arguments_to_function(_, result)
  (/#{error} too many arguments to function '(.*)'#{near_regex}/.match result).try do |it|
    {target: it[1], near: it[2]}
  end
end
explain_was_not_declared_in_this_scope(_, result) click to toggle source
# File lib/feedback_hook.rb, line 25
def explain_was_not_declared_in_this_scope(_, result)
  (/#{error} '(.*)' was not declared in this scope#{near_regex}/.match result).try do |it|
    {target: it[1], near: it[2]}
  end
end
near_regex() click to toggle source
# File lib/feedback_hook.rb, line 11
def near_regex()
  '.*[\t \n]* *(.*)\n[ \t]+\^'
end