Skip to content

2. Implementation

Claude Roux edited this page Nov 26, 2020 · 4 revisions

Implementation

The whole interpreter has been implemented in C++11 and is based on STL templates for most of it. In particular, we have chosen to implement strings as wstring objects, which pose some issues on Windows.

On most platforms, wstring is implemented as an array of wchar_t, which are recorded as 32 bits elements. However, on Windows, wchar_t are implemented as UTF16 characters, on 16 bits. This poses some problems for large Unicode characters, which might require two wchar_t of 16 bits each.

This poses some problems when accessing a character at a specific position in a string on Windows. To avoid these problems, it is better to split the string into character before accessing its content.

Clone this wiki locally