Hi Igor,<br><br><div class="gmail_quote">On Thu, Apr 22, 2010 at 8:23 PM, Igor Stasenko <span dir="ltr">&lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello,<br>
<br>
i thought that to conserve the space, it would be good to use a<br>
symbols for primitive name and module name<br>
in my methods.<br>
Since all of my native-boost enabled methods using same primitive, so<br>
i thought that i can just put following:<br>
        &lt;primitive: #primitiveNativeCall module: #NativeBoostPlugin&gt;<br>
and therefore, save some space , since declaration like following:<br>
        &lt;primitive: &#39;primitiveNativeCall&#39; module: &#39;NativeBoostPlugin&#39;&gt;<br>
adds extra two strings to the pragma, which attached to method.<br>
(What is interesting, that a first literal of compiled method, using<br>
symbols for these names, instead of strings..<br>
While pragma keeps original copies of strings, and therefore wasting<br>
extra space, which i want to avoid).<br></blockquote><div><br></div><div>Look at STParserST80&gt;&gt;parsePrimitive.  Abstract the &quot;self failUnless: currentTokenFirst == $&#39;. self parseString&quot;&#39;s to a method or block and make them accept either strings or symbols and email me the fix :)</div>
<div><br></div><div>HTH</div><div>Eliot</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
What i found, that syntax highlighting turns the rest of method&#39;s<br>
source in red color (like if there is a parse error),<br>
while parser is perfectly ok with such syntax, and accepts such<br>
methods without any problems.<br>
<br>
Moreover, its 100% safe to use symbols instead of strings for prim/module names,<br>
since they seem used by compiler anyways, and i even double-checked it<br>
with VMMaker, that it can handle symbols instead of strings for named<br>
primitives.<br>
&gt;From Interpreter&#39;s comment:<br>
<br>
primitiveExternalCall<br>
        &quot;Call an external primitive. The external primitive methods<br>
        contain as first literal an array consisting of:<br>
        * The module name (String | Symbol)<br>
        * The function name (String | Symbol)<br>
<br>
so, a syntax highlighting is a bit annoying, and i&#39;d like to fix that.<br>
Any clues where to look at?<br>
<font color="#888888"><br>
--<br>
Best regards,<br>
Igor Stasenko AKA sig.<br>
<br>
</font></blockquote></div><br>