191030.2.1.3 · ab639e1b7412fa09f5302cf3cfcfbabef883cf6b
EditorConfig: Lua
Enforce consistent code styles for all Lua files (.lua, .lang, .theme):
* Indent: 2 spaces.
* Trim trailing whitespace.
* Insert final new line.
* UTF-8 encoding.
Manually fix all scripts that didn't pass EClint validation (256 files).
reading declarations
Changes to plugins/cpp_ref_cplusplus_com.lua. All files
plugins/cpp_ref_cplusplus_com.lua
@@ -10,7 +10,7 @@ Categories = {"c++", "html", "rtf", "latex", "odt" } function syntaxUpdate(desc) if desc~="C and C++" then- return+ return end function Set (list)@@ -19,14 +19,14 @@ function syntaxUpdate(desc) return set end - string_items = Set {"string" , "u16string", "u32string"}+ string_items = Set {"string" , "u16string", "u32string"} - stl_items = Set {"array", "bitset", "deque", "forward_list", "list",+ stl_items = Set {"array", "bitset", "deque", "forward_list", "list", "map", "multimap", "multiset", "priority_queue", "queue", "set", "stack", "unordered_map", "unordered_multimap", "unordered_multiset", "unordered_set", "vector" } - algorithm_items = Set {"adjacent_find", "all_of", "any_of","binary_search", "copy",+ algorithm_items = Set {"adjacent_find", "all_of", "any_of","binary_search", "copy", "copy_backward", "copy_if", "copy_n", "count", "count_if", "equal", "equal_range", "fill", "fill_n", "find", "find_end", "find_first_of", "find_if", "find_if_not", "for_each", "generate", "generate_n", "includes", "inplace_merge", "is_heap", "is_heap_until", "is_partitioned",@@ -42,83 +42,83 @@ function syntaxUpdate(desc) "set_union", "shuffle", "sort", "sort_heap", "stable_partition", "stable_sort", "swap", "swap_ranges", "transform", "unique", "unique_copy", "upper_bound" } - clib_items = Set {"cassert", "cctype", "cerrno", "cfloat", "ciso646",+ clib_items = Set {"cassert", "cctype", "cerrno", "cfloat", "ciso646", "climits", "clocale", "cmath", "csetjmp", "csignal", "cstdarg", "cstddef", "cstdio ", "cstdlib", "cstring", "ctime"} - iostream_items=Set {+ iostream_items=Set { "filebuf", "fstream", "ifstream", "ios", "iostream", "ios_base", "istream", "istringstream", "ofstream", "ostream", "ostringstream", "streambuf", "stringbuf", "stringstream", "cerr", "cin", "clog", "cout", "fpos", "streamoff", "streampos", "streamsize" }- + chrono_items=Set {- "duration", "duration_values","high_resolution_clock","steady_clock","system_clock","time_point"+ "duration", "duration_values","high_resolution_clock","steady_clock","system_clock","time_point" }- + codecvt_items=Set { "codecvt_utf16","codecvt_utf8","codecvt_utf8_utf16" }- + random_items=Set {- "bernoulli_distribution", "binomial_distribution", "cauchy_distribution", "chi_squared_distribution", - "discrete_distribution", "exponential_distribution", "extreme_value_distribution", - "fisher_f_distribution", "gamma_distribution", "geometric_distribution", "lognormal_distribution", - "negative_binomial_distribution", "normal_distribution", "piecewise_constant_distribution", - "piecewise_linear_distribution", "poisson_distribution", "student_t_distribution", "uniform_int_distribution", - "uniform_real_distribution", "weibull_distribution"+ "bernoulli_distribution", "binomial_distribution", "cauchy_distribution", "chi_squared_distribution",+ "discrete_distribution", "exponential_distribution", "extreme_value_distribution",+ "fisher_f_distribution", "gamma_distribution", "geometric_distribution", "lognormal_distribution",+ "negative_binomial_distribution", "normal_distribution", "piecewise_constant_distribution",+ "piecewise_linear_distribution", "poisson_distribution", "student_t_distribution", "uniform_int_distribution",+ "uniform_real_distribution", "weibull_distribution" }- + ratio_items=Set {- "ratio_add", "ratio_divide", "ratio_equal", "ratio_greater", "ratio_greater_equal", "ratio_less", + "ratio_add", "ratio_divide", "ratio_equal", "ratio_greater", "ratio_greater_equal", "ratio_less", "ratio_less_equal", "ratio_multiply", "ratio_not_equal", "ratio_subtract" }- + regex_items=Set {- "basic_regex", "match_results", "regex_error", "regex_iterator", "regex_token_iterator", "regex_traits", - "sub_match", "cmatch", "csub_match", "regex", "smatch", "ssub_match", "wcmatch", "wcsub_match", + "basic_regex", "match_results", "regex_error", "regex_iterator", "regex_token_iterator", "regex_traits",+ "sub_match", "cmatch", "csub_match", "regex", "smatch", "ssub_match", "wcmatch", "wcsub_match", "wregex", "wsmatch", "wssub_match", "regex_replace", "regex_match", "regex_search" }- + system_error_items=Set {- "error_category", "error_code", "error_condition", "is_error_code_enum", "is_error_condition_enum", + "error_category", "error_code", "error_condition", "is_error_code_enum", "is_error_condition_enum", "system_error", "errc", "generic_category", "make_error_code", "make_error_condition", "system_category" }- + tuple_items=Set { "tuple", "tuple_element", "tuple_size", "uses_allocator", "forward_as_tuple", "get", "make_tuple", "swap", "tie", "tuple_cat", "ignore" }- + type_traits_items=Set {- "false_type", "integral_constant", "true_type", "alignment_of", "extent", "has_virtual_destructor", "is_abstract", "is_arithmetic", "is_array", - "is_assignable", "is_base_of", "is_class", "is_compound", "is_const", "is_constructible", "is_convertible", "is_copy_assignable", - "is_copy_constructible", "is_default_constructible", "is_destructible", "is_empty", "is_enum", "is_floating_point", "is_function", - "is_fundamental", "is_integral", "is_literal_type", "is_lvalue_reference", "is_member_function_pointer", "is_member_object_pointer", - "is_member_pointer", "is_move_assignable", "is_move_constructible", "is_nothrow_assignable", "is_nothrow_constructible", "is_nothrow_copy_assignable", - "is_nothrow_copy_constructible", "is_nothrow_default_constructible", "is_nothrow_destructible", "is_nothrow_move_assignable", "is_nothrow_move_constructible", - "is_object", "is_pod", "is_pointer", "is_polymorphic", "is_reference", "is_rvalue_reference", "is_same", "is_scalar", "is_signed", "is_standard_layout", - "is_trivial", "is_trivially_assignable", "is_trivially_constructible", "is_trivially_copyable", "is_trivially_copy_assignable", "is_trivially_copy_constructible", - "is_trivially_default_constructible", "is_trivially_destructible", "is_trivially_move_assignable", "is_trivially_move_constructible", "is_union", "is_unsigned", - "is_void", "is_volatile", "rank", "add_const", "add_cv", "add_lvalue_reference", "add_pointer", "add_rvalue_reference", "add_volatile", "aligned_storage", - "aligned_union", "common_type", "conditional", "decay", "enable_if", "make_signed", "make_unsigned", "remove_all_extents", "remove_const", "remove_cv", - "remove_extent", "remove_pointer", "remove_reference", "remove_volatile", "result_of", "underlying_type"+ "false_type", "integral_constant", "true_type", "alignment_of", "extent", "has_virtual_destructor", "is_abstract", "is_arithmetic", "is_array",+ "is_assignable", "is_base_of", "is_class", "is_compound", "is_const", "is_constructible", "is_convertible", "is_copy_assignable",+ "is_copy_constructible", "is_default_constructible", "is_destructible", "is_empty", "is_enum", "is_floating_point", "is_function",+ "is_fundamental", "is_integral", "is_literal_type", "is_lvalue_reference", "is_member_function_pointer", "is_member_object_pointer",+ "is_member_pointer", "is_move_assignable", "is_move_constructible", "is_nothrow_assignable", "is_nothrow_constructible", "is_nothrow_copy_assignable",+ "is_nothrow_copy_constructible", "is_nothrow_default_constructible", "is_nothrow_destructible", "is_nothrow_move_assignable", "is_nothrow_move_constructible",+ "is_object", "is_pod", "is_pointer", "is_polymorphic", "is_reference", "is_rvalue_reference", "is_same", "is_scalar", "is_signed", "is_standard_layout",+ "is_trivial", "is_trivially_assignable", "is_trivially_constructible", "is_trivially_copyable", "is_trivially_copy_assignable", "is_trivially_copy_constructible",+ "is_trivially_default_constructible", "is_trivially_destructible", "is_trivially_move_assignable", "is_trivially_move_constructible", "is_union", "is_unsigned",+ "is_void", "is_volatile", "rank", "add_const", "add_cv", "add_lvalue_reference", "add_pointer", "add_rvalue_reference", "add_volatile", "aligned_storage",+ "aligned_union", "common_type", "conditional", "decay", "enable_if", "make_signed", "make_unsigned", "remove_all_extents", "remove_const", "remove_cv",+ "remove_extent", "remove_pointer", "remove_reference", "remove_volatile", "result_of", "underlying_type" }- + function getURL(token, cat)- url='http://www.cplusplus.com/reference/'..cat.. '/' .. token .. '/'-- if (HL_OUTPUT== HL_FORMAT_HTML or HL_OUTPUT == HL_FORMAT_XHTML) then- return '<a class="hl" target="new" href="' .. url .. '">'.. token .. '</a>'- elseif (HL_OUTPUT == HL_FORMAT_LATEX) then- return '\\href{'..url..'}{'..token..'}'- elseif (HL_OUTPUT == HL_FORMAT_RTF) then- return '{{\\field{\\*\\fldinst HYPERLINK "'..url..'" }{\\fldrslt\\ul\\ulc0 '..token..'}}}'- elseif (HL_OUTPUT == HL_FORMAT_ODT) then- return '<text:a xlink:type="simple" xlink:href="'..url..'">'..token..'</text:a>'- end- end+ url='http://www.cplusplus.com/reference/'..cat.. '/' .. token .. '/'++ if (HL_OUTPUT== HL_FORMAT_HTML or HL_OUTPUT == HL_FORMAT_XHTML) then+ return '<a class="hl" target="new" href="' .. url .. '">'.. token .. '</a>'+ elseif (HL_OUTPUT == HL_FORMAT_LATEX) then+ return '\\href{'..url..'}{'..token..'}'+ elseif (HL_OUTPUT == HL_FORMAT_RTF) then+ return '{{\\field{\\*\\fldinst HYPERLINK "'..url..'" }{\\fldrslt\\ul\\ulc0 '..token..'}}}'+ elseif (HL_OUTPUT == HL_FORMAT_ODT) then+ return '<text:a xlink:type="simple" xlink:href="'..url..'">'..token..'</text:a>'+ end+ end function Decorate(token, state)