You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/changelog/index.html
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,7 @@ <h3>New features:</h3>
61
61
<li>Static labels (i.e. labels that don't move between passes) can now be used in more places, including if statements. (RPG Hacker)</li>
62
62
<li>Asar can be built as a static library. (Atari2)</li>
63
63
<li>Asar now uses named warnings and errors instead of magic numbers as identifiers. (p4plus2, RPG Hacker)</li>
64
+
<li>Variadic macro parameters now use the syntax <codeclass="65c816_asar"><...[math]></code>, which makes them less ambiguous and helps prevent syntax parsing bugs. (RPG Hacker)</li>
64
65
</ul>
65
66
66
67
<h3>Bug fixes:</h3>
@@ -96,6 +97,7 @@ <h3>Deprecated features:</h3>
96
97
<li><code>;@command</code> and <code>@command</code> notation: Use <code>command</code> instead.</li>
97
98
<li>Wrapping defines to resolve in quotes (e.g. <code>db "!define"</code>): The quotes aren't needed (<code>db !define</code>).</li>
98
99
<li>Single-line/inline if statements: Use full if blocks with an <code>if</code>/<code>endif</code> pair instead.</li>
100
+
<li><codeclass="65c816_asar"><math></code> syntax for variadic macro parameters: Use <codeclass="65c816_asar"><...[math]></code> insread.</li>
In addition to named substitutions if the variadic token <codeclass="65c816_asar">...</code> is specified as the last parameter asar will allow an arbitrary number of parameters after all prior parameters have been satisfied.
2442
-
To access unnamed arguments of a variadic function they are declared numerically starting from 0 up to the number of provided parameters. To access the number of provided variadic arguments one may use <codeclass="65c816_asar">sizeof(...)</code>.
2442
+
To access unnamed parameters of a variadic macro, use the syntax <codeclass="65c816_asar"><...[{math}]></code>, where <codeclass="65c816_asar">math</code> is any math expression evaluating to the index of a variadic parameter. These are declared numerically starting from 0 up to the number of provided parameters. To access the number of provided variadic arguments one may use <codeclass="65c816_asar">sizeof(...)</code>.
2443
2443
Lastly, it is important to note that while traditionally macros do not parse defines at their creation variadic macros will. This is to allow iteration of arguments by using defines.
0 commit comments