Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17560

Provide engine function to parse string from script into in-memory representation

$
0
0

Currently, trying to parse script code manually to for instance parse metadata requires you to manually parse strings including the various forms (single quotes, double quotes, heredoc) which duplicates engine logic.

 

It would be helpful if we could simply call an engine function to parse it instead. Provide an input buffer to store the result (or null to query the buffer size required) and return the result with all syntax resolved, including escape sequences.

 

This function could look like this:

size_t ParseScriptString(char* buffer, size_t bufferSize, const char* string, size_t stringLength = 0) const;

 


Viewing all articles
Browse latest Browse all 17560

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>