mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 09:23:44 +00:00
Estimated hours taken: 8 Branches: main Move the rest of mode_errors.m to use error_util. compiler/mode_errors.m: The parts of this module that generate error messages (as opposed to progress messages) now all return a description of the error to a central place for printing by error_util.m. This should make it significantly easier to add new error messages. compiler/error_util.m: Add the new capability to support mode_errors.m: that of describing in one data structure a sequence of calls to write_error_pieces. compiler/hlds_out.m: Given a bunch of existing predicates that print various things, provide versions that convert those things to strings, for use in mode_errors.m. Write_unify_context had two versions for printing and only one version for conversion to pieces; add the second version for conversion to pieces. Change the order of arguments of the five-argument version of write_unify_context to allow the use of state variables. compiler/mercury_to_mercury.m: compiler/prog_out.m: Given a bunch of existing predicates that print various things, provide versions that convert those things to strings, for use in hlds_out.m and mode_errors.m. compiler/det_report.m: Conform to the changed argument order of write_unify_context. library/term_io.m: Fix an old bug: the code of add_escaped_char wasn't actually doing any escaping. hlds_out.m now relies on it doing so. tests/hard_coded/xmlable_test.m: Due to the bugfix in term_io.m, string__string now protects &s with backslashes; expect this. tests/invalid/*.err_exp: Expect mode error messages in the new, better format.
109 lines
2.3 KiB
XML
109 lines
2.3 KiB
XML
<?xml version="1.0"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html>
|
|
<head>
|
|
<title>Testing <123></title>
|
|
</head>
|
|
<!-- Hi - Mom! -->
|
|
<body><table border="1" cellspacing="0" cellpadding="5">
|
|
<tr>
|
|
<td>1</td>
|
|
<td>"one"</td>
|
|
</tr>
|
|
<tr>
|
|
<td>2</td>
|
|
<td>"two"</td>
|
|
</tr>
|
|
<tr>
|
|
<td>3</td>
|
|
<td>"three"</td>
|
|
</tr>
|
|
<tr>
|
|
<td>4</td>
|
|
<td>"four"</td>
|
|
</tr>
|
|
<tr>
|
|
<td>5</td>
|
|
<td>"five"</td>
|
|
</tr>
|
|
<tr>
|
|
<td>6</td>
|
|
<td>"six &<>!@$%^`&*()-+=\'"</td>
|
|
</tr>
|
|
</table><hr /> <!-- inline comment --><script type="text/javascript">
|
|
<![CDATA[document.write('hello');]]>
|
|
</script></body>
|
|
</html>
|
|
|
|
<?xml version="1.0"?>
|
|
<html>
|
|
<head>
|
|
<title>Testing <123></title>
|
|
</head>
|
|
<!-- Hi - Mom! -->
|
|
<body><table border="1" cellspacing="0" cellpadding="5">
|
|
<tr>
|
|
<td>1</td>
|
|
<td>"one"</td>
|
|
</tr>
|
|
<tr>
|
|
<td>2</td>
|
|
<td>"two"</td>
|
|
</tr>
|
|
<tr>
|
|
<td>3</td>
|
|
<td>"three"</td>
|
|
</tr>
|
|
<tr>
|
|
<td>4</td>
|
|
<td>"four"</td>
|
|
</tr>
|
|
<tr>
|
|
<td>5</td>
|
|
<td>"five"</td>
|
|
</tr>
|
|
<tr>
|
|
<td>6</td>
|
|
<td>"six &<>!@$%^`&*()-+=\'"</td>
|
|
</tr>
|
|
</table><hr /> <!-- inline comment --><script type="text/javascript">
|
|
<![CDATA[document.write('hello');]]>
|
|
</script></body>
|
|
</html>
|
|
|
|
<html>
|
|
<head>
|
|
<title>Testing <123></title>
|
|
</head>
|
|
<!-- Hi - Mom! -->
|
|
<body><table border="1" cellspacing="0" cellpadding="5">
|
|
<tr>
|
|
<td>1</td>
|
|
<td>"one"</td>
|
|
</tr>
|
|
<tr>
|
|
<td>2</td>
|
|
<td>"two"</td>
|
|
</tr>
|
|
<tr>
|
|
<td>3</td>
|
|
<td>"three"</td>
|
|
</tr>
|
|
<tr>
|
|
<td>4</td>
|
|
<td>"four"</td>
|
|
</tr>
|
|
<tr>
|
|
<td>5</td>
|
|
<td>"five"</td>
|
|
</tr>
|
|
<tr>
|
|
<td>6</td>
|
|
<td>"six &<>!@$%^`&*()-+=\'"</td>
|
|
</tr>
|
|
</table><hr /> <!-- inline comment --><script type="text/javascript">
|
|
<![CDATA[document.write('hello');]]>
|
|
</script></body>
|
|
</html>
|
|
|