Skip to content

Commit cf28fda

Browse files
paolopasgrafikrobot
authored andcommitted
Refactor output (err) functions.
+ Move to standard PP indents (incrementally). + better indenting of preprocessor directives in jam.h + print_source_line, backtrace_line, backtrace, and unknown_rule_error (formerly unknown_rule) function definitions moved from builtins.cpp to outerr.cpp + new rule_and_args_to_string and out_warning functions added + COMMAND builtin rule is now an alias for SHELL, to reflect the documentation and also because it is not used and one day might be discontinued + new function try_bind_module added to builtins.cpp, to check for modules before the binding and error/warning diagnostics; currently used by both IMPORT and EXPORT builtin rules [1] + new template function b2::find_hash added to simplify usage of hash_find, this is in builtins.cpp by now + use of "global module" instead of "root module" in messages + builtin_import (IMPORT) and builtin_native_rule (NATIVE_RULE) updated to use outerr functions to emit errors + call_member_rule in compile.cpp updated to emit a warning using out_warning + struct _stack::check::operator() and function_call_rule in function.cpp now emit a warning using out_warning + function_call_rule e function_call_member_rule in function.cpp now emit an error using out_error + restored "root module" in place of "global module" in messages and documentation, where appropriate + error issued by RULENAMES too on missing module, + get rid of add_rule_name function in builtins.cpp, duplicate of module_rules in modules.cpp. [1] Requesting an import from a non-existent module produces a warning and the use of the global module by IMPORT; conversely requesting an export from a non-existent module produces an error by the EXPORT. See #565 for details about the rationale. fixes #581
1 parent 1d97d36 commit cf28fda

9 files changed

Lines changed: 546 additions & 492 deletions

File tree

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ PenaltyBreakFirstLessLess: 0
7575
PenaltyReturnTypeOnItsOwnLine: 999999
7676
PenaltyIndentedWhitespace: 999999
7777
PointerAlignment: Middle
78-
PPIndentWidth: 0
78+
PPIndentWidth: 4
7979
ReflowComments: true
8080
ShortNamespaceLines: 0
8181
SortIncludes: CaseInsensitive

doc/src/history.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33

44
== Version 5.5.0
55

6-
* *New*: Argument lists description provided for all built-in rules,
6+
* *New*: Argument lists description provided for all builtin rules,
77
GLOB-RECURSIVELY has become an alias of GLOB_RECURSIVELY.
8+
-- _Paolo Pastori_
89
* *New*: Added test for regular expressions with MATCH builtin rule.
910
-- _Paolo Pastori_
11+
* *New*: Improved control of source module by IMPORT, EXPORT, and
12+
RULENAMES builtin rules.
13+
-- _Paolo Pastori_
1014
* *New*: Add reading/parsing of property database from JSON data to base CPS
1115
support from.
1216
-- _René Ferdinand Rivera Morell_

0 commit comments

Comments
 (0)