V
V
Vasily Melnikov2016-12-27 21:02:04
C++ / C#
Vasily Melnikov, 2016-12-27 21:02:04

How to check the syntactical correctness of a lua script?

Interested in lua. An interesting thing, especially good integration with C ++.
It seems a lot is clear, but one question has not yet been able to resolve. Namely, how to check the syntactic validity of a script from a C/C++ program.
Roughly speaking, this is what luac does: on error, it prints out a description and a string.
Alternatively, you can use it and just broadcast the message to the user, but maybe there is a more accurate way? Because in this case, the script will definitely need to be saved to a file, which I would like to avoid.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim Misbakh-Soloviev, 2017-04-29
@mva

Alternatively, you can use loadstring/loadfile

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question