pieterderycke / Jace

Jace.NET is a calculation engine for the .NET platform.
MIT License
436 stars 94 forks source link

Symbol names with underscores could be handled #5

Closed rummelsworth closed 10 years ago

rummelsworth commented 10 years ago

For the project I'm working on, a client needs to be able to enter variable names with underscores in them, like "var_1" instead of "var1". They could come at any part of the name.

I made a stab at adjusting TokenReader.cs to allow this. On line 161, I added || character == '_' to the or-chain. It seems to work well, but I'm not yet familiar with the entirety of the tokenization mechanism to be absolutely certain there aren't other things that would need changing.

pieterderycke commented 10 years ago

This seems an acceptable request. I will look for the impact and make the necessary modifications to support it.

pieterderycke commented 10 years ago

Jace now supports variables with underscores. Like numbers, underscores are not allowed as first character of a variable name.

Valid: some_variable Not valid: _variable

It will be released with the 0.8.6 version.