Skip to content
🎉 Welcome! This is a banner message.

Nesting


JSON Nesting

DCC can nest JSON in a certain way, so syntax highlighting needs to support JSON syntax. When JSON is embedded, there will be indentation relative to the previous and next lines. The specific amount of indentation is not strictly specified, such as:

Previous statement
    {
        "name": "Tom"
    }
Next statement

Nested JSON code needs to be highlighted using JSON syntax

C++ Nesting

You can wrap C++ code using +++, these three characters occupy a separate line and no comments are allowed

Previous statement
+++
#include<iostream>
int main(){
    std::cout<<"hello word";
}
+++
Next statement

C++ code can be defined anywhere in the file and called globally