Math-Parser

Tim Holzschuh via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat May 3 11:20:31 PDT 2014


Am 03.05.2014 13:29, schrieb Timon Gehr via Digitalmars-d-learn:
> @property Lexer lexer() pure { return _lexer; }
>
> If you change the result of a call to 'lexer' this will not change 
> '_lexer'. Mark the property 'ref' or get rid of it

How did I forget about Lexer being a struct is a value type...?
Thank you!

> if( !previous && !token.type == TokenType.end )
>     popFront();

My favourite. *g*

> Let me know if you also want hints on how to get the logic right.
Would be very nice!
While 2*2 works, 2+2 throws an Error because the number-method gets an 
END-Token instead of a Number-Token (although I'm not sure why).

Thank you,
Tim


More information about the Digitalmars-d-learn mailing list