diff options
author | Richard Carlsson <[email protected]> | 2018-03-08 12:31:49 +0100 |
---|---|---|
committer | Richard Carlsson <[email protected]> | 2018-03-12 16:24:33 +0100 |
commit | 9c1cb443a22679f038451b4491c4c50ec53f77a2 (patch) | |
tree | cf7f3541e6328a9714dda83147b232ca4460a554 /lib/stdlib/src/erl_lint.erl | |
parent | 1f90069ac153214a0510fa862361e1e31d558b91 (diff) | |
download | otp-9c1cb443a22679f038451b4491c4c50ec53f77a2.tar.gz otp-9c1cb443a22679f038451b4491c4c50ec53f77a2.tar.bz2 otp-9c1cb443a22679f038451b4491c4c50ec53f77a2.zip |
Allow multiple modifier characters in io:format control sequences
This makes it possible to print unicode atoms at the same time as
suppressing detection of printable lists.
Diffstat (limited to 'lib/stdlib/src/erl_lint.erl')
-rw-r--r-- | lib/stdlib/src/erl_lint.erl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl index 1930c462e8..9a62d21d34 100644 --- a/lib/stdlib/src/erl_lint.erl +++ b/lib/stdlib/src/erl_lint.erl @@ -3971,6 +3971,8 @@ extract_sequence(3, [$.,_|Fmt], Need) -> extract_sequence(4, Fmt, Need); extract_sequence(3, Fmt, Need) -> extract_sequence(4, Fmt, Need); +extract_sequence(4, [$t, $l | Fmt], Need) -> + extract_sequence(4, [$l, $t | Fmt], Need); extract_sequence(4, [$t, $c | Fmt], Need) -> extract_sequence(5, [$c|Fmt], Need); extract_sequence(4, [$t, $s | Fmt], Need) -> @@ -3987,8 +3989,14 @@ extract_sequence(4, [$t, C | _Fmt], _Need) -> {error,"invalid control ~t" ++ [C]}; extract_sequence(4, [$l, $p | Fmt], Need) -> extract_sequence(5, [$p|Fmt], Need); +extract_sequence(4, [$l, $t, $p | Fmt], Need) -> + extract_sequence(5, [$p|Fmt], Need); extract_sequence(4, [$l, $P | Fmt], Need) -> extract_sequence(5, [$P|Fmt], Need); +extract_sequence(4, [$l, $t, $P | Fmt], Need) -> + extract_sequence(5, [$P|Fmt], Need); +extract_sequence(4, [$l, $t, C | _Fmt], _Need) -> + {error,"invalid control ~lt" ++ [C]}; extract_sequence(4, [$l, C | _Fmt], _Need) -> {error,"invalid control ~l" ++ [C]}; extract_sequence(4, Fmt, Need) -> |