Skip to content

Commit

Permalink
Remove the exhaustive step boolean flag
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti committed Oct 11, 2024
1 parent 5afe305 commit ff3997f
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 541 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,6 @@ enum class SchemaCompilerTemplateIndex : std::uint8_t {
};
#endif

// TODO: Do we really need "dynamic", "report", and "exhaustive" on
// non-applicators?

#define DEFINE_STEP_WITH_VALUE(category, name, type) \
struct SchemaCompiler##category##name { \
const Pointer relative_schema_location; \
Expand All @@ -192,7 +189,6 @@ enum class SchemaCompilerTemplateIndex : std::uint8_t {
const std::string schema_resource; \
const bool dynamic; \
const bool report; \
const bool exhaustive; \
const type value; \
};

Expand All @@ -204,7 +200,6 @@ enum class SchemaCompilerTemplateIndex : std::uint8_t {
const std::string schema_resource; \
const bool dynamic; \
const bool report; \
const bool exhaustive; \
const type value; \
const SchemaCompilerTemplate children; \
};
Expand Down
3 changes: 0 additions & 3 deletions src/jsonschema/compile_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ auto make(const bool report, const SchemaCompilerContext &context,
schema_context.base.recompose(),
context.uses_dynamic_scopes,
report,
context.mode != SchemaCompilerMode::FastValidation,
value};
}

Expand All @@ -50,7 +49,6 @@ auto make(const bool report, const SchemaCompilerContext &context,
schema_context.base.recompose(),
context.uses_dynamic_scopes,
report,
context.mode != SchemaCompilerMode::FastValidation,
std::move(value),
std::move(children)};
}
Expand All @@ -71,7 +69,6 @@ auto unroll(const SchemaCompilerDynamicContext &dynamic_context,
std::get<Type>(step).schema_resource,
std::get<Type>(step).dynamic,
std::get<Type>(step).report,
std::get<Type>(step).exhaustive,
std::get<Type>(step).value};
}

Expand Down
6 changes: 2 additions & 4 deletions src/jsonschema/default_compiler_draft4.h
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,7 @@ auto compiler_draft4_applicator_properties_conditional_annotation(
dynamic_context.base_instance_location.concat(
type_step.relative_instance_location),
type_step.keyword_location, type_step.schema_resource,
type_step.dynamic, type_step.report, type_step.exhaustive,
type_step.value});
type_step.dynamic, type_step.report, type_step.value});
} else if (context.mode == SchemaCompilerMode::FastValidation &&
substeps.size() == 1 &&
std::holds_alternative<SchemaCompilerAssertionType>(
Expand All @@ -537,8 +536,7 @@ auto compiler_draft4_applicator_properties_conditional_annotation(
dynamic_context.base_instance_location.concat(
type_step.relative_instance_location),
type_step.keyword_location, type_step.schema_resource,
type_step.dynamic, type_step.report, type_step.exhaustive,
type_step.value});
type_step.dynamic, type_step.report, type_step.value});
} else if (context.mode == SchemaCompilerMode::FastValidation &&
substeps.size() == 1 &&
std::holds_alternative<
Expand Down
1 change: 0 additions & 1 deletion test/evaluator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ add_executable(sourcemeta_jsontoolkit_evaluator_unit
evaluator_draft4_test.cc
evaluator_draft6_test.cc
evaluator_draft7_test.cc
evaluator_evaluate_test.cc
evaluator_test.cc)
noa_add_default_options(PRIVATE sourcemeta_jsontoolkit_evaluator_unit)
target_link_libraries(sourcemeta_jsontoolkit_evaluator_unit
Expand Down
Loading

0 comments on commit ff3997f

Please sign in to comment.