Added TOY_DISABLE_REPL option for compiling

This commit is contained in:
2023-06-07 00:04:05 +10:00
parent 07f4a98b95
commit d3eb31d964
4 changed files with 8 additions and 4 deletions

View File

@@ -115,13 +115,15 @@
<ClCompile> <ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)/source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)/source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard_C>stdc17</LanguageStandard_C> <LanguageStandard_C>stdc17</LanguageStandard_C>
<PreprocessorDefinitions>LIB_RUNNER_EXPORT</PreprocessorDefinitions> <PreprocessorDefinitions>
</PreprocessorDefinitions>
</ClCompile> </ClCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile> <ClCompile>
<LanguageStandard_C>stdc17</LanguageStandard_C> <LanguageStandard_C>stdc17</LanguageStandard_C>
<PreprocessorDefinitions>LIB_RUNNER_EXPORT</PreprocessorDefinitions> <PreprocessorDefinitions>
</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)/source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)/source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>

View File

@@ -132,6 +132,7 @@
<ClCompile Include="source\toy_literal_dictionary.c" /> <ClCompile Include="source\toy_literal_dictionary.c" />
<ClCompile Include="source\toy_memory.c" /> <ClCompile Include="source\toy_memory.c" />
<ClCompile Include="source\toy_parser.c" /> <ClCompile Include="source\toy_parser.c" />
<ClCompile Include="source\toy_reffunction.c" />
<ClCompile Include="source\toy_refstring.c" /> <ClCompile Include="source\toy_refstring.c" />
<ClCompile Include="source\toy_scope.c" /> <ClCompile Include="source\toy_scope.c" />
</ItemGroup> </ItemGroup>
@@ -152,6 +153,7 @@
<ClInclude Include="source\toy_memory.h" /> <ClInclude Include="source\toy_memory.h" />
<ClInclude Include="source\toy_opcodes.h" /> <ClInclude Include="source\toy_opcodes.h" />
<ClInclude Include="source\toy_parser.h" /> <ClInclude Include="source\toy_parser.h" />
<ClInclude Include="source\toy_reffunction.h" />
<ClInclude Include="source\toy_refstring.h" /> <ClInclude Include="source\toy_refstring.h" />
<ClInclude Include="source\toy_scope.h" /> <ClInclude Include="source\toy_scope.h" />
<ClInclude Include="source\toy_token_types.h" /> <ClInclude Include="source\toy_token_types.h" />

View File

@@ -15,7 +15,7 @@ STATIC_ASSERT(sizeof(unsigned char) == 1);
STATIC_ASSERT(sizeof(unsigned short) == 2); STATIC_ASSERT(sizeof(unsigned short) == 2);
STATIC_ASSERT(sizeof(unsigned int) == 4); STATIC_ASSERT(sizeof(unsigned int) == 4);
#ifndef TOY_EXPORT #ifndef TOY_DISABLE_REPL
//declare the singleton with default values //declare the singleton with default values
Toy_CommandLine Toy_commandLine = { Toy_CommandLine Toy_commandLine = {

View File

@@ -28,7 +28,7 @@
#endif #endif
#ifndef TOY_EXPORT #ifndef TOY_DISABLE_REPL
//for processing the command line arguments in the repl //for processing the command line arguments in the repl
typedef struct { typedef struct {