V
V
Vaskiv992018-06-28 11:37:12
C++ / C#
Vaskiv99, 2018-06-28 11:37:12

How to use my language from c#?

I wrote my interpreter for my language in C#. Basically, it's a parser. The code is simply stored in a text document. Now I have a task to call a method from my language in c#. In my language, I have a function that will return for example a number multiplied by 2. How to call this function and get the result from it from c#? I don't understand how it can be done

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Victor P., 2018-06-28
@Jeer

There is a book, "Expressive Javascript", I think. It describes how to make your own interpreter, but. This is for javascript. I don't know how to do this in c#.

R
Roman, 2018-06-28
@yarosroman

Roslyn allows you to work with C# code at runtime, compile assemblies, include them and call them dynamically without any problems, do you need your own language?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question