Skip to content

Commit

Permalink
poc json (stringify) output
Browse files Browse the repository at this point in the history
  • Loading branch information
Nelson-numerical-software committed Jan 7, 2024
1 parent d464fe3 commit 7f7373b
Show file tree
Hide file tree
Showing 9 changed files with 374 additions and 151 deletions.
8 changes: 8 additions & 0 deletions modules/display_format/builtin/cpp/formatBuiltin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,14 @@ DisplayFormatOptionsToArray(
bool
setDisplayOption(const std::wstring& param1, const std::wstring& param2)
{
if (param1 == L"JSON" && param2.empty()) {
NelsonConfiguration::getInstance()->setOutputJson(true);
return true;
}
if (param1 == L"TEXT" && param2.empty()) {
NelsonConfiguration::getInstance()->setOutputJson(false);
return true;
}
if (param1 == L"DEFAULT" && param2.empty()) {
NelsonConfiguration::getInstance()->setLineSpacingDisplay(NLS_LINE_SPACING_LOOSE);
NelsonConfiguration::getInstance()->setNumericFormatDisplay(NLS_NUMERIC_FORMAT_SHORT);
Expand Down
2 changes: 2 additions & 0 deletions modules/interpreter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ target_include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/../types/src/include
${CMAKE_CURRENT_SOURCE_DIR}/../overload/src/include
${CMAKE_CURRENT_SOURCE_DIR}/../error_manager/src/include
${CMAKE_CURRENT_SOURCE_DIR}/../stream_manager/src/include
${CMAKE_CURRENT_SOURCE_DIR}/../debugger/src/include
${CMAKE_CURRENT_SOURCE_DIR}/../display_format/src/include
${CMAKE_CURRENT_SOURCE_DIR}/../stream_manager/src/include
Expand All @@ -67,6 +68,7 @@ target_link_libraries(
nlsCommons
nlsDisplay_format
nlsError_manager
nlsStream_manager
nlsI18n
nlsNelson_manager
nlsDebugger
Expand Down
5 changes: 5 additions & 0 deletions modules/interpreter/src/c/nlsInterpreter.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@
<ItemGroup>
<ClCompile Include="..\cpp\AbstractSyntaxTreeHelpers.cpp" />
<ClCompile Include="..\cpp\AnonymousMacroFunctionDef.cpp" />
<ClCompile Include="..\cpp\JsonInterface.cpp" />
<ClCompile Include="..\cpp\TextToNumber.cpp" />
<ClCompile Include="..\cpp\AbstractSyntaxTree.cpp" />
<ClCompile Include="..\cpp\BuiltInFunctionDef.cpp" />
Expand Down Expand Up @@ -332,6 +333,9 @@
<ProjectReference Include="..\..\..\profiler\src\c\nlsProfiler.vcxproj">
<Project>{3a10cbee-b778-46ca-9c0f-720dedced9f2}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\stream_manager\src\c\nlsStream_manager.vcxproj">
<Project>{1b461db6-82ea-4436-a674-d2975f184b90}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\types\src\c\nlsTypes.vcxproj">
<Project>{ab85e897-56b7-4792-8a8e-f3797be2b7cc}</Project>
</ProjectReference>
Expand All @@ -340,6 +344,7 @@
<ResourceCompile Include="resources.rc" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\cpp\JsonInterface.hpp" />
<ClInclude Include="..\cpp\TextToNumber.hpp" />
<ClInclude Include="..\cpp\CallMexBuiltin.hpp" />
<ClInclude Include="..\cpp\operators\RelationOperatorsHelpers.hpp" />
Expand Down
Loading

0 comments on commit 7f7373b

Please sign in to comment.