Transpiling Question #472

Open
opened 2015-03-22 01:29:49 -05:00 by rjamesnw · 0 comments
rjamesnw commented 2015-03-22 01:29:49 -05:00 (Migrated from github.com)

Hi, I'm experimenting with converting C# files (designed for this purpose) into JavaScript. The C# files only have a reference to the System and System.Dynamic namespaces only (nothing else is allowed). My plan was to use the parsing to break it all apart, then traverse the expression tree to output JavaScript. I wanted to confirm if this is the right course, or is it best to add all syntax trees in a "project content" object, compile it, and somehow use/analyze that instead? My goal is to trap any errors, such as parsing, and unresolved semantics, and let the user know if something they did is not supported/wrong. I figured out the parsing errors part (via the demo), and I also know where the namespaces are. I don't understand how to check for unresolved types or semantics to determine if something the user is doing is not allowed/not supported...? For example, I'm only loading the mscorlib and System.Core.dll assemblies into a project content object. If, after compiling, a type is "unresolved" because I didn't load that library, then I need to find it and tell the user. Thanks.

Hi, I'm experimenting with converting C# files (designed for this purpose) into JavaScript. The C# files only have a reference to the System and System.Dynamic namespaces only (nothing else is allowed). My plan was to use the parsing to break it all apart, then traverse the expression tree to output JavaScript. I wanted to confirm if this is the right course, or is it best to add all syntax trees in a "project content" object, compile it, and somehow use/analyze that instead? My goal is to trap any errors, such as parsing, and unresolved semantics, and let the user know if something they did is not supported/wrong. I figured out the parsing errors part (via the demo), and I also know where the namespaces are. I don't understand how to check for unresolved types or semantics to determine if something the user is doing is not allowed/not supported...? For example, I'm only loading the mscorlib and System.Core.dll assemblies into a project content object. If, after compiling, a type is "unresolved" because I didn't load that library, then I need to find it and tell the user. Thanks.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-icsharpcode/NRefactory#472
No description provided.