AST like coding syntax. Easy upgrade!
cym13 via Digitalmars-d
digitalmars-d at puremagic.com
Sun Sep 6 16:49:31 PDT 2015
On Sunday, 6 September 2015 at 23:48:30 UTC, cym13 wrote:
> On Sunday, 6 September 2015 at 23:40:58 UTC, anonymous wrote:
>> On Monday 07 September 2015 00:37, cym13 wrote:
>>
>>> There already is a kind of "code string":
>>>
>>> interpret(q{
>>> var a = 2;
>>> var b += a;
>>> });
>>>
>>> It doesn't do any kind of syntax check, but there again how
>>> do you want to have syntax check for any language? The D
>>> compiler is a D compiler, it can't support js syntax or
>>> whatever.
>>
>> There's a very basic syntax check: Token strings (q{...}) go
>> through tokenization. Compilation fails when the contents
>> aren't valid tokens. For example, q{'} fails with "Error:
>> unterminated character constant".
Ah, just reread the post, I was OT sorry for my last post.
More information about the Digitalmars-d
mailing list