pjc0247 / SlowSharp

C# interpreter written in C#
MIT License
131 stars 15 forks source link

Does this have support for inline namespaces? #6

Open friuns2 opened 2 years ago

friuns2 commented 2 years ago

for example this works fine using UnityEngine; Debug.Log("test");

but when i type UnityEngine.Debug.Log("test");

it says UnityEngine not found

pjc0247 commented 2 years ago

No, that's one of the misimplemented part of this project.

TypeResolver only tries to find the typename with the first token. (in this case, it will be UnityEngine not a Debug)

https://github.com/pjc0247/SlowSharp/blob/73e7422ff2162b10139a82f92ce665df5cd5e110/Slowsharp/Runner/TypeCache.cs#L33-L97

pjc0247 commented 2 years ago

Oh, forget about the answer abote. FindType seems fine.

I think the problem is here: https://github.com/pjc0247/SlowSharp/blob/73e7422ff2162b10139a82f92ce665df5cd5e110/Slowsharp/Runner/Runner.Expression.cs#L350-L474

which is really complicated. (so many cases to resolve call syntax)

friuns2 commented 2 years ago

then i use namespaces for now :)